Configurator Builder Utils
This library helps you build Configurator Entries and Context Parameters from a Map of configurations.
Usage
Map myInputConfiguration = [CONFIG : [NAME : "myInput",
LABEL: "My Input",
TYPE : InputType.USERENTRY],
ENTRY_CONFIG: [RECALCULATE_PARENT_ON_CONFIRM: true],
MANAGE_STATE: true]
ConfiguratorEntry entry = libs.SharedAccLib.ConfiguratorBuilderUtils.getConfiguratorEntry(myInputConfiguration)Overall Configuration Structure
CONFIG – Entry key for the configurations that will be applied to ContextParameter.
ENTRY_CONFIG – Entry key for the configurations that will be applied to ConfiguratorEntry.
MANAGE_STATE – Specify whether this config should be sent to the ConfiguratorStateManager or not.
ContextParameter Configuration
Main Configurations
Configurations that will be applied directly in context parameter.
NAME – Input name.
TYPE – Input type.
LABEL – Input label. The config value will be sent to
setLabelin ContextParameter.VALUE – Input value. The config value will be sent to
setValuein ContextParameter.ADD_UNKNOWN_VALUES – The config value will be sent to
setAddUnknownValuesin ContextParameter.ALWAYS_EDITABLE – The config value will be sent to
setAlwaysEditablein ContextParameter.FILTER – The config value will be sent to
setFilterin ContextParameter.FILTERS – The config value will be sent to
setFiltersin ContextParameter.TRANSLATIONS/LABEL_TRANSLATIONS – The config value will be sent to
setLabelTranslationsin ContextParameter.TRANSLATIONS_FROM_MAP/LABEL_TRANSLATIONS_FROM_MAP – The config value will be sent to
setLabelTranslationsFromMapin ContextParameter.PARAMETER_CONFIG – The config value will be sent to
setParameterConfigin ContextParameter.PARAMETER_GROUP – The config value will be sent to
setParameterGroupin ContextParameter.READ_ONLY – The config value will be sent to
setReadOnlyin ContextParameter.REQUIRED – The config value will be sent to
setRequiredin ContextParameter.TYPE_ID – The config value will be sent to
setTypedIdin ContextParameter.URL – The config value will be sent to
setURLin ContextParameter.VALUE_HINT – The config value will be sent to
setValueHintin ContextParameter.OPTIONS/VALUE_OPTIONS – The config value will be sent to
setValueOptionsin ContextParameter.
Config Parameter Configurations
Configurations that will be applied using contextParameter.setConfigParameter(configName, configValue).
Default input configurations
NO_REFRESH – Configuration for
noRefreshconfig name.VALUES – Configuration for
valuesconfig name.
Simple input type configuration
DATA_TYPE – Configuration for
dataTypeconfig name.FORMAT_TYPE – Configuration for
formatTypeconfig name.INPUT_TYPE – Configuration for
inputTypeconfig name.
Date range input type configuration
FROM – Configuration for
fromconfig name.TO – Configuration for
toconfig name.
Option input type configuration
LABELS – Configuration for
labelsconfig name.
Product/Customer input type configuration
PA_SEARCHABLE – Configuration for
paSearchableconfig name.
Filter builder input type configuration
TYPE_CODE – Configuration for
typeCodeconfig name.
Matrix input type configuration
COLUMNS – Configuration for
columnsconfig name.COLUMN_LABELS – Configuration for
columnLabelsconfig name.COLUMN_TYPE – Configuration for
columnTypeconfig name.DISABLE_ROW_SELECTION – Configuration for
disableRowSelectionconfig name.READ_ONLY_COLUMNS – Configuration for
readOnlyColumnsconfig name.FIT_FIELD_WIDTHS – Configuration for
fitFieldWidthsconfig name.DEFAULT_HEIGHT – Configuration for
defaultHeightconfig name.COLUMN_VALUE_OPTIONS – Configuration for
columnValueOptionsconfig name.CAN_MODIFY_ROWS – Configuration for
canModifyRowsconfig name.NO_CELL_REFRESH – Configuration for
noCellRefreshconfig name.FIX_TABLE_HEIGHT – Configuration for
fixTableHeightconfig name.
ConfiguratorEntry configuration
Main Configurations
Configurations that will be applied directly in ConfiguratorEntry.
MESSAGE – Set configurator entry message. The config value will be sent to
setMessagein ConfiguratorEntry.
Additional Configuration
Configuration that will be applied using ConfiguratorEntry.addAdditionalConfigValue(configKey, configValue).
RECALCULATE_PARENT_ON_CONFIRM/RECALCULATE_PARENT_ENTITY_ON_CONFIRM – Configuration for
recalculateParentEntityOnConfirmconfig name.LAYOUT – Configuration for
layoutconfig name.VERTICAL_LAYOUT – Accepts a Boolean value. Alias for LAYOUT: ”vertical”
Configuration Key
It is possible to use the following form of configuration key in your configuration map.
Uppercase: e.g., LAYOUT, VERTICAL_LAYOUT
Lowercase: e.g., layout, vertical_layout
Camel case: e.g., verticalLayout
Snake case: e.g., VERTICAL_LAYOUT, vertical_layout
So, those configuration variants are valid to use:
[MANAGE_STATE: true]
[manage_state: true]
[manageState: true]