File

src/ui/common/services/databound-control-registry.service.ts

Index

Methods

Methods

addExpectedDataboundControls
addExpectedDataboundControls(expectedControlsByDataSource: Map)

Merges additional expected databound controls into the existing map. Used when a dynamic layout fragment slot is loaded after form init. Returns only the entries that were actually added, so the caller can later remove exactly its own contribution without taking away expectations another owner registered first.

Parameters :
Name Type Optional Description
expectedControlsByDataSource Map<string | string[]> No
  • Datasource to control instance-name map to merge in.
Returns : Map<string, string[]>

The entries actually added by this call.

getDataboundControl
getDataboundControl(instanceName: string)

Gets a databound control by instance name

Parameters :
Name Type Optional Description
instanceName string No
  • The instance name of the databound control
Returns : IDataBoundControl

The databound control

getDataboundControlAsObservable
getDataboundControlAsObservable(instanceName: string)

Gets a databound control by instance name as an observable

Parameters :
Name Type Optional Description
instanceName string No
  • The instance name of the databound control

The databound control as an observable

getDataboundControlsForDataSourceAsObservable
getDataboundControlsForDataSourceAsObservable(dataSourceName: string)

Gets registered databound controls associated with a data source. If the form provided no expected controls for the data source, this emits an empty array immediately.

Parameters :
Name Type Optional Description
dataSourceName string No
  • The data source instance name.
getDataboundControlSignal
getDataboundControlSignal(instanceName: string)

Gets a databound control by instance name as a signal.

Parameters :
Name Type Optional Description
instanceName string No
  • The instance name of the databound control

The databound control as a signal

registerDataboundControl
registerDataboundControl(control: IDataBoundControl)

Registers a databound control

Parameters :
Name Type Optional Description
control IDataBoundControl No
  • The databound control to register
Returns : void
removeExpectedDataboundControls
removeExpectedDataboundControls(expectedControlsByDataSource: Map)

Removes the given expected databound controls (per data source). The data source entry is dropped only once it has no remaining expected controls. Callers must pass only the entries they contributed (the return value of addExpectedDataboundControls) so expectations shared with another owner survive. Used when a dynamic layout fragment slot is cleared.

Parameters :
Name Type Optional Description
expectedControlsByDataSource Map<string | string[]> No
  • Datasource to control instance-name map to remove.
Returns : void
setExpectedDataboundControls
setExpectedDataboundControls(expectedControlsByDataSource: Map)

Sets the databound controls expected to register for each data source.

Parameters :
Name Type Optional Description
expectedControlsByDataSource Map<string | string[]> No
  • Datasource to control instance-name map.
Returns : void
unregisterAll
unregisterAll()

Unregisters all databound controls from this registry.

Returns : void
unregisterDataboundControl
unregisterDataboundControl(instanceName: string)

Unregisters a databound control

Parameters :
Name Type Optional Description
instanceName string No
  • The instance name of the databound control
Returns : void

results matching ""

    No results matching ""