ExtensionApi
Method summary
name | description |
---|---|
addBinding | Add a binding to an element. |
addEntities | Add entities to the view model. |
addExternalScript | Adds a new external script include to the vdl page |
addInlineScript | Adds a new inline script to the vdl page |
addVirtualBinding | Insert a virtual binding onto an element. Optionally merge with an existing virtual binding node if present. |
createDynamicVariable | Tell the model builder to create a new dynamic variable and return it. |
createId | Generate an id that is unique during this application instance. |
getComponentParamsBuilder | Get a component params builder for a given element. This will allow you to apply component params to the element as well as inspecting existing ones and serialising the params to add to the DOM. |
getEntityReference | Get the view model reference for an entity. |
getExtensionMetadata | Get metadata about the registered extensions. |
getModelEntityByName | Get the metadata for a model entity. |
getValidatorMetadata | Get metadata about the registered validators. |
isValidScenario | Returns |
preLoadAttachmentsOnAllScenarios | Pre-loads attachments for all scenarios |
preLoadAttachmentsOnScenarios | Pre-loads attachments for scenarios |
preLoadEntitiesOnAllScenarios | Pre-loads entities for all scenarios |
preLoadEntitiesOnScenarios | Pre-loads entities for scenarios |
preLoadParametersOnAllScenarios | Pre-loads parameters for all scenarios |
preLoadParametersOnScenarios | Pre-loads parameters for scenarios |
viewIsReady | Returns an observable which can be subscribed to and receives a callback when the view is ready |
viewIsValid | Returns an observable which can be subscribed to and receives a callback when the views validity is decided |
Methods
- addBinding ( element, name, value ) → {ExtensionApi}
-
Add a binding to an element.
Parameters:
paramsName Type Description element typeElementThe DOM element to apply the binding to name typestringThe binding name value typestringThe binding expression detailsReturns:returns tableType Description typeExtensionApi - addEntities ( entityNames ) → {ExtensionApi}
-
Add entities to the view model.
Parameters:
paramsName Type Description entityNames typestring | Array.<string>One or more entity names to add to the view model detailsReturns:returns tableType Description typeExtensionApi - addExternalScript ( src )
-
Adds a new external script include to the vdl page
Parameters:
paramsName Type Description src typestringthe source of the external script to include details - addInlineScript ( scriptContent )
-
Adds a new inline script to the vdl page
Parameters:
paramsName Type Description scriptContent typestringthe script contents to add details - addVirtualBinding ( elements, name, value, shouldMerge ) → {ExtensionApi}
-
Insert a virtual binding onto an element. Optionally merge with an existing virtual binding node if present.
Parameters:
paramsName Type Argument Default Description elements typeElement | Array.<Element>The DOM element to apply the binding to, or an array of elements to wrap with the binding name typestringThe binding name value typestringThe binding expression shouldMerge typebooleanoptional false Toggle merge into existing virtual binding, if present, otherwise creates a new virtual binding node detailsThrows:
exceptionsIf the binding is not permitted to be used as a virtual bindingReturns:returns tableType Description typeExtensionApi - createDynamicVariable ( name, execTxt, isViewScoped ) → {function}
-
Tell the model builder to create a new dynamic variable and return it.
Parameters:
paramsName Type Description name typestringexecTxt typestringisViewScoped typebooleandetailsReturns:returns tableType Description typefunctionthe created dynamic variable - createId ( prefix ) → {string}
-
Generate an id that is unique during this application instance.
Parameters:
paramsName Type Argument Description prefix typestringoptional prefix for the generated id detailsReturns:returns tableType Description typestringThe generated id - getComponentParamsBuilder ( element ) → {ComponentParamsBuilder}
-
Get a component params builder for a given element. This will allow you to apply component params to the element as well as inspecting existing ones and serialising the params to add to the DOM.
Parameters:
paramsName Type Description element typeElementThe element to apply the params to detailsReturns:returns tableType Description typeComponentParamsBuilderThe component params builder - getEntityReference ( name, scenarioId ) → {string}
-
Get the view model reference for an entity.
Parameters:
paramsName Type Argument Description name typestringThe name of the entity scenarioId typenumberoptional The scenario index to get the entity from, if not specified it will fall back to and expression that resolves to either the current scenario in context (when Knockout is bound) or the first scenario detailsReturns:returns tableType Description typestringThe reference for the entity on the view model - getExtensionMetadata ( ) → {Array.<{name: string, tag: string, attributes: Array.<string>, modifiesDescendants: boolean}>}
-
Get metadata about the registered extensions.
detailsReturns:returns tableType Description typeArray.<{name: string, tag: string, attributes: Array.<string>, modifiesDescendants: boolean}> - getModelEntityByName ( entityName ) → {ModelEntity}
-
Get the metadata for a model entity.
Parameters:
paramsName Type Description entityName typestringThe entity name to fetch metadata for detailsReturns:returns tableType Description typeModelEntityThe entity or undefined if no entity exists with that name - getValidatorMetadata ( ) → {*|Array.<{name: string, doc: ExtensionDoc}>}
-
Get metadata about the registered validators.
detailsReturns:returns tableType Description type* | Array.<{name: string, doc: ExtensionDoc}> - isValidScenario ( idOrIndex ) → {boolean}
-
Returns
Parameters:
paramsName Type Description idOrIndex typestring | numberthe id or index of a scenario on the shelf. detailsReturns:returns tableType Description typebooleanwhether scenario can be found. - preLoadAttachmentsOnAllScenarios ( ) → {ExtensionApi}
-
Pre-loads attachments for all scenarios
detailsReturns:returns tableType Description typeExtensionApi - preLoadAttachmentsOnScenarios ( scenarios ) → {ExtensionApi}
-
Pre-loads attachments for scenarios
Parameters:
paramsName Type Description scenarios typestring | Array.<string>One or more scenario index to pre-load detailsReturns:returns tableType Description typeExtensionApi - preLoadEntitiesOnAllScenarios ( entityNames ) → {ExtensionApi}
-
Pre-loads entities for all scenarios
Parameters:
paramsName Type Description entityNames typestring | Array.<string>One or more entity names to pre-load detailsReturns:returns tableType Description typeExtensionApi - preLoadEntitiesOnScenarios ( entityNames, scenarios ) → {ExtensionApi}
-
Pre-loads entities for scenarios
Parameters:
paramsName Type Description entityNames typestring | Array.<string>One or more entity names to pre-load scenarios typestring | Array.<string>One or more scenario index to pre-load detailsReturns:returns tableType Description typeExtensionApi - preLoadParametersOnAllScenarios ( ) → {ExtensionApi}
-
Pre-loads parameters for all scenarios
detailsReturns:returns tableType Description typeExtensionApi - preLoadParametersOnScenarios ( scenarios ) → {ExtensionApi}
-
Pre-loads parameters for scenarios
Parameters:
paramsName Type Description scenarios typestring | Array.<string>One or more scenario index to pre-load detailsReturns:returns tableType Description typeExtensionApi - viewIsReady ( ) → {function}
-
Returns an observable which can be subscribed to and receives a callback when the view is ready
detailsReturns:returns tableType Description typefunctionviewIsReady observable - viewIsValid ( ) → {function}
-
Returns an observable which can be subscribed to and receives a callback when the views validity is decided
detailsReturns:returns tableType Description typefunctionviewIsValid observable
© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.