getSelectedObjects()
The selected objects as the rich-client bridge delivers them: the raw
bridge string, without any parsing or normalization. This is the raw
read of the bridge member osjxGetSelectedObjects on the
getRichClientApi() handle — NOT
the normalized facade method
getSelectedObjects(), which
parses exactly this string and delivers the normalized shape instead.
3. Behavior
The method reads the bridge member osjxGetSelectedObjects per
call (lazily — a bridge state that is injected or swapped later is
visible immediately, not a snapshot from handle creation) and returns
its result:
-
the raw selection string
"osid,objectTypeId;…"— oneosid,objectTypeIdtuple per selected object, joined by;(raw ids — e.g. typeless documents carry the raw rich-client type ids13107200/19660800); -
''(the empty string) when nothing is selected — a real value, notnull; -
nullwhen the value is unreadable: the bridge member is missing (or not a function), the bridge call throws, or the result is not a string.
The method does no parsing: it returns the string verbatim. For the
normalized SelectedEntry[] shape, use
parseRichClientSelectionString
— or the facade
getSelectedObjects().
4. Examples
const rich = dashlet.getRichClientApi();
const raw = rich.getSelectedObjects();
// '1024,262145;2048,262145' — something is selected (raw bridge string)
// '' — nothing is selected (real value, not null)
// null — unreadable (missing member / throwing call)
if (raw === null) {
// the bridge could not answer (missing member, throwing call)
} else if (raw === '') {
// empty selection — the bridge answered with an empty string
} else {
const entries = parseRichClientSelectionString(raw); // SelectedEntry[]
}
For the normalized shape, see
parseRichClientSelectionString
and the facade
getSelectedObjects().
5. Errors
The read itself never throws: an absent member, a throwing bridge
call, or a non-string result all yield null (see Behavior).
The accessor and the handle do throw:
-
Error('dashlet destroyed')— the dashlet was destroyed before the call (accessor and handle method). -
TypeError: Dashlet.getRichClientApi(): the environment is not resolved yet - await the dashlet.init promise first— the call happened before the environment was resolved. -
TypeError: Dashlet.getRichClientApi(): the rich client API handle is only available in the richClient environment (current: …)— call in the wrong environment (the current value is named).