close

Filter

loading table of contents...

Studio Developer Manual / Version 2110

Table Of Contents

5.4.6 Concurrency

Being remote beans, the Content objects inherit the concurrent behavior of the bean layer. A request to load content data is issued upon first querying any property except for isDocument() and isFolder()). However, since the response arrives asynchronously and is handled in a subsequent execution, the getter methods will initially return undefined. You must therefore make your code robust to handle this situation - which commonly is done by attaching a value change listener that is invoked once the content properties become available, or create a property path expression and use its loadValue(AnyFunction) method (see Section 5.3.6, “Value Expressions”). Depending on the execution sequence, content may be loaded due to some other, potentially unrelated request before you access it - but your code must not rely on it.

All singletons (Cap, CapConnection, CapLoginService, session/CapSession, ContentRepository, UserRepository) and all ContentType objects, however, are fully loaded before the Studio application's initialization process is finished (which is why these interfaces do not extend RemoteBean).

When you want to make sure that values have actually hit the server after an update, you can use RemoteBean#flush(AnyFunction), and register a callback function.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.