Factory object for creating CustomParameter
instances.
Created parameters are always one of two available types:
- Key-value pair where value is plain string. Created using CustomParameter.createSimple(..) method.
- Key-value pair where value is always set to one of predefined values. Created using CustomParameter.createEnum(..) method.
Note that CustomParameter
s created here don't hold the value itself. It's rather a definition which gives Application Builder information required to build up the UI.
If you're interested in consuming CustomParameter
values defined by Application Builder Business User, they will be passed within the dependencies parameter given to
the ExtensionManager.initialise(), ExtensionManager.destroy() and
ExtensionManager.generateRuntimeCode() methods.
- Version:
- 17.1.1
- Source:
- See:
-
- BOPExtensionManager where you can use instances of
CustomParameter
s to define input values required for BOP initialization.
- BOPExtensionManager where you can use instances of
Methods
(static) createEnum(params) → {extensions.dt/js/api/CustomParameter}
stable API
Creates an enumeration instance where value can be one of prefedined values.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object | Object literal with all possible parameters. Properties
|
- Version:
- 17.1.1
- Source:
Returns:
Examples
CustomParameter.createEnum({
key: 'environment',
displayName: 'Choose type of the environment you want to work with',
values: [
'Development',
'Testing',
'Production'
]
});
CustomParameter.createEnum({
key: 'environment',
displayName: 'Choose type of the environment you want to work with',
values: [
'Development',
'Testing',
'Production'
],
defaultValue: 'Testing':
});
(static) createSimple(key, displayName, defaultValueopt) → {extensions.dt/js/api/CustomParameter}
stable API
Creates a simple instance representing key-value pair.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
key |
String | Key value identifying this |
|
displayName |
String | Display name representing this |
|
defaultValue |
String |
<optional> |
Default value for this |
- Version:
- 17.1.1
- Source:
Returns:
Examples
CustomParameter.createSimple('SourceURL', 'URL poiting to the source of this BOP');
CustomParameter.createSimple('SourceURL', 'URL pointing to the source of this BOP', 'https://my.url.com');