Class TreeInputBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic final recordNested 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 ObjectSets thePriceFxInterface.FIELD_CONTEXTPARAM_CHECKED_STRATEGYkey for theTreeInputBuilderinstance.setMultiple(boolean isMultiple) Sets thePriceFxInterface.FIELD_CONTEXTPARAM_MULTIPLEkey for theTreeInputBuilderinstance.Adds data set in the predefined structure to theTreeInputBuilderinstance.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 theTreeInputBuilderinstance.The data set needs to be in the proper structure (title/value/children), otherwise the
InputBuilderExceptions.IllegalDataStructureExceptionis thrown.The
PriceFxInterface.TREE_INPUT_KEY_TITLEandPriceFxInterface.TREE_INPUT_KEY_VALUEkeys are mandatory. ThePriceFxInterface.TREE_INPUT_KEY_CHILDRENkey is optional, but when present, needs to benull, empty collection or containsPriceFxInterface.TREE_INPUT_KEY_TITLEandPriceFxInterface.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_MULTIPLEkey for theTreeInputBuilderinstance.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_STRATEGYkey for theTreeInputBuilderinstance.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:
_getInputin classAbstractInputBuilder<TreeInputBuilder,Object>
-