Class TreeInputBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static final record
Nested classes/interfaces inherited from class AbstractInputBuilder
AbstractInputBuilder.InputWidth
-
Field Summary
Fields inherited from class AbstractInputBuilder
builderContext, cp
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
Sets thePriceFxInterface.FIELD_CONTEXTPARAM_CHECKED_STRATEGY
key for theTreeInputBuilder
instance.setMultiple
(boolean isMultiple) Sets thePriceFxInterface.FIELD_CONTEXTPARAM_MULTIPLE
key for theTreeInputBuilder
instance.Adds data set in the predefined structure to theTreeInputBuilder
instance.Methods inherited from class AbstractInputBuilder
addOrUpdateInput, addToConfiguratorEntry, addToConfiguratorEntry, buildContextParameter, buildMap, getInput, self, setAccessCode, setAlign, setAllValueTypesTracking, setAlwaysEditable, setAppearance, setAutoComplete, setAutoFocus, setCaption, setConfigValues, setCustomAttributeName, setCustomAttributeValue, setDefaultValueTracking, setDefaultWidth, setDisabled, setDisplayMode, setErrorMessage, setExportable, setFirstRunTracking, setFlex, setHelpLink, setHelpText, setIcon, setIconPosition, setImportable, setLabel, setLabelPlacement, setLabelStyle, setLabelTranslations, setLayoutGridName, setLogActivity, setNoRefresh, setParameterGroup, setPlaceholderText, setPreviousValueTracking, setReadOnly, setRequired, setShowInline, setSize, setStoreAuditTrail, setSuccessMessage, setTab, setTheme, setTitle, setTrackedValue, setUserGroupEdit, setUserGroupEdit, setUserGroupView, setUserGroupView, setValue, setValueChangeTracking, setValueHint, setWarningMessage, setWidth
-
Constructor Details
-
TreeInputBuilder
-
-
Method Details
-
setTree
Adds data set in the predefined structure to theTreeInputBuilder
instance.The data set needs to be in the proper structure (title/value/children), otherwise the
InputBuilderExceptions.IllegalDataStructureException
is thrown.The
PriceFxInterface.TREE_INPUT_KEY_TITLE
andPriceFxInterface.TREE_INPUT_KEY_VALUE
keys are mandatory. ThePriceFxInterface.TREE_INPUT_KEY_CHILDREN
key is optional, but when present, needs to benull
, empty collection or containsPriceFxInterface.TREE_INPUT_KEY_TITLE
andPriceFxInterface.TREE_INPUT_KEY_VALUE
.Example:
// data set where 'title' and 'value' keys are mandatory and 'children' is optional // (can be null, empty collection or title/value/children structure) // values for 'value' key needs to be unique across all data set def data = [[title : 'Cars', value : '[Cars]', children: [[title: 'Bugatti', value: '[Cars, Bugatti]']]], [title : 'Bikes', value : '[Bikes]', children: [[title: 'Bugatti', value: '[Bikes, Bugatti]']]]] if(api.isInputGenerationExecution()) { return api.inputBuilderFactory() .createTreeEntry('hierarchicalFilter') .setTree(data) .getInput() } return input.hierarchicalFilter
-
setMultiple
Sets thePriceFxInterface.FIELD_CONTEXTPARAM_MULTIPLE
key for theTreeInputBuilder
instance.Default value is
false
.Example:
return api.inputBuilderFactory() .createTreeEntry('hierarchicalFilter') .setTree(someData) .setMultiple(true) .getInput()
- Parameters:
isMultiple
- The multiple flag, default value isfalse
.- Returns:
- self
- Since:
- 15.0 - Southside
-
setCheckedStrategy
Sets thePriceFxInterface.FIELD_CONTEXTPARAM_CHECKED_STRATEGY
key for theTreeInputBuilder
instance.Default value is
TreeInputBuilder.CheckedStrategy.PARENT
.Example:
// the import or static import is required for the CheckedStrategy enum import net.pricefx.formulaengine.scripting.inputbuilder.TreeInputBuilder.CheckedStrategy return api.inputBuilderFactory() .createTreeEntry('hierarchicalFilter') .setTree(someData) .setCheckedStrategy(CheckedStrategy.CHILD) .getInput()
- Parameters:
strategy
- The checkedStrategy value, default value isTreeInputBuilder.CheckedStrategy.PARENT
.- Returns:
- self
- Since:
- 15.0 - Southside
-
_getInput
- Specified by:
_getInput
in classAbstractInputBuilder<TreeInputBuilder,
Object>
-