ReferenceComponent
Form input for references to other dms objects. As the user types, a CMIS fulltext search (narrowed to the allowed target types from the field’s object:reference[...] classification) provides suggestions. The selected object id(s) are stored; on load they are resolved back to display chips.
Label retrieval
The chip label shown for a referenced object is its resolved object-config title, not a raw property. Both search hits and objects resolved on load are turned into a ReferenceEntry by #toEntryFromDms, which asks ObjectConfigService.getResolvedObjectConfig for the title of the object’s data. The tricky part is picking the right config: reference targets are usually secondary object types (SOTs) applied to a generic primary type, and the title-defining config is keyed by the SOT’s virtual config id (colons replaced by dots, e.g. appCasem.caseDocument) inside the owning app’s bucket — not under the primary object type id. #resolveConfigType therefore probes each allowed target type the hit actually carries (as primary type or SOT), trying the dotted and raw config ids, and uses the first bucket that defines one; it falls back to the primary object type’s default config, and ultimately to the raw object id when no title can be resolved. Objects that cannot be fetched at all (e.g. deleted or access-denied) become notFound entries labelled with their id.
Opening a reference entry
A chip can be opened only when a loaded feature app claims responsibility for the referenced object’s type. #openAppId maps the entry’s objectTypeId to an owning app id via ObjectConfigService.getAppIdForType, and canOpen gates the action on ShellService.canOpenObjectFor (and on the entry not being notFound) — this drives whether the chip is rendered as an openable link. Invoking open delegates to ShellService.openObject, passing the app id and the entry’s cached data so the app can route to / display the object without an extra fetch.
Example :
<yuv-reference [multiselect]="true" [classifications]="['object:reference[appCasem:correctionDocument]']" />Component Metadata
Section titled “Component Metadata”Selector: yuv-reference
Standalone: Yes
Implements: ControlValueAccessor, OnInit, OnDestroy
Inputs
Section titled “Inputs”classifications
Section titled “classifications”Type: string[] | undefined
Default Value: undefined
Additional semantics for the form element. The object:reference[...] classification restricts the suggestions to the target types listed in the brackets.
maxSuggestions
Section titled “maxSuggestions”Type: number
Default Value: 10
Maximal number of suggestions for the given search term (default: 10)
minChars
Section titled “minChars”Type: number
Default Value: 2
Minimal number of characters to trigger the search (default: 2)
multiselect
Section titled “multiselect”Type: boolean
Default Value: false
Indicator that multiple references could be selected, they will be rendered as chips (default: false).
readonly
Section titled “readonly”Type: boolean
Default Value: false
Will prevent the input from being changed (default: false)
situation
Section titled “situation”Type: string | undefined
Default Value: undefined
Possibles values are EDIT (default),SEARCH,CREATE. In search situation validation of the form element will be turned off, so you are able to enter search terms that do not meet the elements validators.
disabled
Section titled “disabled”Type: BooleanInput
placeholder
Section titled “placeholder”Type: string
required
Section titled “required”Type: BooleanInput
Properties
Section titled “Properties”_innerValue
Section titled “_innerValue”Type: ReferenceEntry[]
Default Value: []
acFormControl
Section titled “acFormControl”Type: unknown
Default Value: new FormControl<AutocompleteItem | AutocompleteItem[] | undefined>(undefined)
autocompleteRes
Section titled “autocompleteRes”Type: AutocompleteItem[]
Default Value: []
Type: unknown
Default Value: signal<boolean>(false)
ngControl
Section titled “ngControl”Type: unknown
Default Value: injectNgControl(this)
propagateChange
Section titled “propagateChange”Type: unknown
Default Value: () => {...}
autofilled
Section titled “autofilled”Type: boolean
controlType
Section titled “controlType”Type: string
disableAutomaticLabeling
Section titled “disableAutomaticLabeling”Type: boolean
stateChanges
Section titled “stateChanges”Type: unknown
Default Value: new Subject<void>()
userAriaDescribedBy
Section titled “userAriaDescribedBy”Type: string
Methods
Section titled “Methods”autocompleteFn
Section titled “autocompleteFn”autocompleteFn(query: string): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| query | string |
canOpen
Section titled “canOpen”Whether the referenced object can be opened by a loaded app.
canOpen(entry: ReferenceEntry): booleanArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| entry | ReferenceEntry |
Open the referenced object via the owning app’s registered open handler.
open(entry: ReferenceEntry): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| entry | ReferenceEntry |
registerOnChange
Section titled “registerOnChange”registerOnChange(fn: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| fn | any |
registerOnTouched
Section titled “registerOnTouched”registerOnTouched(fn: any): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| fn | any |
resolveFn
Section titled “resolveFn”Resolve stored object ids back to display entries.
resolveFn(ids: string[]): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| ids | string[] |
setDisabledState
Section titled “setDisabledState”setDisabledState(isDisabled: boolean): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| isDisabled | boolean |
writeValue
Section titled “writeValue”writeValue(value: string | string[]): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| value | string | string[] |
onContainerClick
Section titled “onContainerClick”onContainerClick(event: MouseEvent): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| event | MouseEvent |
onFocusIn
Section titled “onFocusIn”onFocusIn(): voidonFocusout
Section titled “onFocusout”onFocusout(): voidonNgOnDestroy
Section titled “onNgOnDestroy”onNgOnDestroy(): voidsetDescribedByIds
Section titled “setDescribedByIds”setDescribedByIds(ids: string[]): voidArguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
| ids | string[] |