Studio Developer Manual / Version 2406.0
Table Of Contents
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.