SelectedEntry
One selected object, normalized identically in all environments.
SelectedEntry is the element type of InitContext.selection and
InitContext.lastSelectedEntry (see InitContext).
1. Fields
| Field | Type | Meaning |
|---|---|---|
|
|
Object ID as a number, or |
|
|
Canonical object type ID. Typeless (internal / workflow tray) documents
normalize to the same marker |
|
|
Main type — see the computation below. |
|
|
|
2. The mainType computation
mainType follows three branches:
-
typeless document → the document class value
1(both environments); -
with a type ID →
objectTypeId >>> 16—0= folder,99= register, anything else = document; -
without a type ID → the host-declared main type when present, else
null.
The library exports the two well-known main types as named constants:
MAIN_TYPE_FOLDER // 0
MAIN_TYPE_REGISTER // 99
3. SelectedObjectRef — the getSelectedObjects result shape
SelectedObjectRef is the looser shape returned by
getSelectedObjects:
{ objectId: string | number | null, objectTypeId: string | number | null }
— ids may arrive as strings or numbers depending on the host; the webclient
host’s array is resolved directly, the rich client’s raw bridge string is
parsed (empty selection → []; typeless documents carry the -1 type
marker in the rich client).