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
setLabel
in ContextParameter.VALUE – Input value. The config value will be sent to
setValue
in ContextParameter.ADD_UNKNOWN_VALUES – The config value will be sent to
setAddUnknownValues
in ContextParameter.ALWAYS_EDITABLE – The config value will be sent to
setAlwaysEditable
in ContextParameter.FILTER – The config value will be sent to
setFilter
in ContextParameter.FILTERS – The config value will be sent to
setFilters
in ContextParameter.TRANSLATIONS/LABEL_TRANSLATIONS – The config value will be sent to
setLabelTranslations
in ContextParameter.TRANSLATIONS_FROM_MAP/LABEL_TRANSLATIONS_FROM_MAP – The config value will be sent to
setLabelTranslationsFromMap
in ContextParameter.PARAMETER_CONFIG – The config value will be sent to
setParameterConfig
in ContextParameter.PARAMETER_GROUP – The config value will be sent to
setParameterGroup
in ContextParameter.READ_ONLY – The config value will be sent to
setReadOnly
in ContextParameter.REQUIRED – The config value will be sent to
setRequired
in ContextParameter.TYPE_ID – The config value will be sent to
setTypedId
in ContextParameter.URL – The config value will be sent to
setURL
in ContextParameter.VALUE_HINT – The config value will be sent to
setValueHint
in ContextParameter.OPTIONS/VALUE_OPTIONS – The config value will be sent to
setValueOptions
in ContextParameter.
Config Parameter Configurations
Configurations that will be applied using contextParameter.setConfigParameter(configName, configValue)
.
Default input configurations
NO_REFRESH – Configuration for
noRefresh
config name.VALUES – Configuration for
values
config name.
Simple input type configuration
DATA_TYPE – Configuration for
dataType
config name.FORMAT_TYPE – Configuration for
formatType
config name.INPUT_TYPE – Configuration for
inputType
config name.
Date range input type configuration
FROM – Configuration for
from
config name.TO – Configuration for
to
config name.
Option input type configuration
LABELS – Configuration for
labels
config name.
Product/Customer input type configuration
PA_SEARCHABLE – Configuration for
paSearchable
config name.
Filter builder input type configuration
TYPE_CODE – Configuration for
typeCode
config name.
Matrix input type configuration
COLUMNS – Configuration for
columns
config name.COLUMN_LABELS – Configuration for
columnLabels
config name.COLUMN_TYPE – Configuration for
columnType
config name.DISABLE_ROW_SELECTION – Configuration for
disableRowSelection
config name.READ_ONLY_COLUMNS – Configuration for
readOnlyColumns
config name.FIT_FIELD_WIDTHS – Configuration for
fitFieldWidths
config name.DEFAULT_HEIGHT – Configuration for
defaultHeight
config name.COLUMN_VALUE_OPTIONS – Configuration for
columnValueOptions
config name.CAN_MODIFY_ROWS – Configuration for
canModifyRows
config name.NO_CELL_REFRESH – Configuration for
noCellRefresh
config name.FIX_TABLE_HEIGHT – Configuration for
fixTableHeight
config 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
setMessage
in ConfiguratorEntry.
Additional Configuration
Configuration that will be applied using ConfiguratorEntry.addAdditionalConfigValue(configKey, configValue)
.
RECALCULATE_PARENT_ON_CONFIRM/RECALCULATE_PARENT_ENTITY_ON_CONFIRM – Configuration for
recalculateParentEntityOnConfirm
config name.LAYOUT – Configuration for
layout
config 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]