JavaScript Extension Development API for Oracle Visual Builder Cloud Service - Classic Applications

Class: extensions.dt/js/api/CustomParameter

Factory object for creating CustomParameter instances.

Created parameters are always one of two available types:

Note that CustomParameters 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 CustomParameters to define input values required for BOP initialization.

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
Name Type Attributes Description
key String

Key value identifying this CustomParameter.

displayName String

Display name representing this CustomParameter.

values Array.<String>

Array of strings listing all available values this Enum provides.

defaultValue String <optional>

Default value for this CustomParameter. If no default value is provided, The first value passed into "values" attribute will be considered as default and Application Builder will always show it initially.

Version:
  • 17.1.1
Source:
Returns:
Type
extensions.dt/js/api/CustomParameter
Examples

Creates CustomParameter which will holds key-value pair where the value will always be one of three pre-defined enumeration values.

CustomParameter.createEnum({
    key: 'environment',
    displayName: 'Choose type of the environment you want to work with',
    values: [
        'Development',
        'Testing',
        'Production'
    ]
});

Creates CustomParameter enumeration with explicitly pre-defined default value.

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 CustomParameter.

displayName String

Display name representing this CustomParameter.

defaultValue String <optional>

Default value for this CustomParameter.

Version:
  • 17.1.1
Source:
Returns:
Type
extensions.dt/js/api/CustomParameter
Examples

Creates CustomParameter which will holds simple key-value pair.

CustomParameter.createSimple('SourceURL', 'URL poiting to the source of this BOP');

Creates CustomParameter which will holds simple key-value pair with a default value pre-defined.

CustomParameter.createSimple('SourceURL', 'URL pointing to the source of this BOP', 'https://my.url.com');