Class ConfiguratorTableInputBuilder
public class ConfiguratorTableInputBuilder
extends AbstractInputBuilder<ConfiguratorTableInputBuilder,Object>
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractInputBuilder
AbstractInputBuilder.InputWidth
-
Field Summary
Fields inherited from class AbstractInputBuilder
builderContext, cp
-
Constructor Summary
ConstructorDescriptionConfiguratorTableInputBuilder
(InputBuilderContext builderContext, String paramName) -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
setColumns
(List<Map> columns) Adds specified columns to the Configurator table.setDefaultHeight
(int value) Sets the maximum table height.setDimensions
(String width, String height) Sets particular dimensions of the modal dialog (Configurator) that is opened when a user clicks the Add button below the ConfiguratorTable.setEnableAdvancedFilter
(boolean enableAdvancedFilter) Allows you to enable or disable the advanced filter functionality.setEnableClientFilter
(boolean enableClientFilter) Allows a user to filter the table by row values.
Default =true
(the filtering is enabled).setFitFieldWidths
(boolean value) Sets whether fields (table cells) should autofit widths to title texts or the content.setFixTableHeight
(boolean value) withEnableAddActions
(boolean enableAddActions) Allows you to disable adding new rows to a table within a Configurator – the 'Add' button will be hidden whenenableAddActions
is set tofalse
.withEnableAdvancedFilter
(boolean enableAdvancedFilter) Allows you to enable or disable the advanced filter functionality.withEnableClientFilter
(boolean enableClientFilter) Allows a user to filter the table by row values.
Default =true
(the filtering is enabled).withEnableDeleteActions
(boolean enableDeleteActions) Allows a user to delete table rows.
Default =true
(deleting is enabled).withEnableDuplicateActions
(boolean enableDuplicateActions) Allows a user to duplicate table rows.
Default =true
(duplicating a row is enabled).withEnableEditActions
(boolean enableEditActions) Allows a user to edit values in the table.
Default =true
(the editing is enabled).withPreferenceName
(String preferenceName) Defines the preference name (whitespace and non-alphanumeric will be dropped).withRowTypes
(List<Object> rowTypes) Specifies row types that can be added to the ConfiguratorTable when a user clicks the 'Add' button to add a row.
Row types are specified by a list of maps, where each map contains thelabel
andurl
parameters.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, setNoRefresh, setParameterGroup, setPlaceholderText, setPreviousValueTracking, setReadOnly, setRequired, setShowInline, setSize, setSuccessMessage, setTheme, setTitle, setTrackedValue, setUserGroupEdit, setUserGroupEdit, setUserGroupView, setValue, setValueChangeTracking, setValueHint, setWarningMessage, setWidth
-
Constructor Details
-
ConfiguratorTableInputBuilder
-
-
Method Details
-
_getInput
- Specified by:
_getInput
in classAbstractInputBuilder<ConfiguratorTableInputBuilder,
Object>
-
setColumns
Adds specified columns to the Configurator table.
Example – adds the configurator table with two columns on the Quote Header:def columns = [ [name: 'Date', label: 'Date', type: 'DATE'], [name: 'Datetime', label: 'Datetime', type: 'DATETIME'], [name: 'Integer', label: 'Integer', type: 'INTEGER'], [name: 'Link', label: 'Link', type: 'LINK'], [name: 'Money', label: 'Money', type: 'MONEY'], [name: 'MoneyEUR', label: 'Money EUR', type: 'MONEY_EUR'], [name: 'Numeric', label: 'Numeric', type: 'NUMERIC'], [name: 'NumericLong', label: 'Numeric Long', type: 'NUMERIC_LONG'], [name: 'Percent', label: 'Percent', type: 'PERCENT'], [name: 'String', label: 'String', type: 'TEXT'], [name: 'Product', label: 'Product', type: 'TEXT'], [name: 'Customer', label: 'Customer', type: 'TEXT'], ] def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTable") .setColumns(columns) .buildMap() quoteProcessor.addOrUpdateInput(ct) return ct
- Parameters:
columns
- A list of maps representing definitions of ConfiguratorTable columns.- Returns:
- the current instance of ConfiguratorTableInputBuilder
- Since:
- 11.0 Paper plane
-
setDimensions
Sets particular dimensions of the modal dialog (Configurator) that is opened when a user clicks the Add button below the ConfiguratorTable.Example:
def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .setDimensions("300", "800") .withRowTypes(rowTypes) .setLabel("Configurator Table") .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
width
- width value as a Stringheight
- height value as a String- Returns:
- the current instance of ConfiguratorTableInputBuilder
-
withEnableClientFilter
Allows a user to filter the table by row values.
Default =true
(the filtering is enabled).Example:
def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .withEnableClientFilter(false) .withRowTypes(rowTypes) .setLabel("Configurator Table") .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
enableClientFilter
- Set tofalse
to disable filtering.- Returns:
- the current instance of ConfiguratorTableInputBuilder
- See Also:
-
setEnableClientFilter
Allows a user to filter the table by row values.
Default =true
(the filtering is enabled).Example:
def ct = api.inputBuilderFactory() .createConfiguratorTable('ConfiguratorTableName') .setColumns(columns) .setColumns(columns) .withEnableClientFilter(false) .withRowTypes(rowTypes) .setLabel("Configurator Table") .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
enableClientFilter
- Set tofalse
to disable filtering.- Returns:
- the current instance of
ConfiguratorTableInputBuilder
- See Also:
-
withEnableAdvancedFilter
Allows you to enable or disable the advanced filter functionality. Default =true
(the filtering is enabled).Example:
def configuratorTable = api.inputBuilderFactory() .createConfiguratorTable('ConfiguratorTableName') .setColumns(columns) .withEnableAdvancedFilter(false) .withRowTypes(rowTypes) .buildContextParameter() def configuratorEntry = api.createConfiguratorEntry() configuratorEntry.createParameter(configuratorTable) return configuratorEntry
- Parameters:
enableAdvancedFilter
- Set tofalse
to disable filtering.- Returns:
- the current instance of
ConfiguratorTableInputBuilder
- Since:
- 13.0 - Rampur
- See Also:
-
setEnableAdvancedFilter
Allows you to enable or disable the advanced filter functionality. Default =true
(the filtering is enabled).Example:
def configuratorTable = api.inputBuilderFactory() .createConfiguratorTable('ConfiguratorTableName') .setColumns(columns) .setEnableAdvancedFilter(false) .setLabel('Configurator Table') .buildContextParameter() def configuratorEntry = api.createConfiguratorEntry() configuratorEntry.createParameter(configuratorTable) return configuratorEntry
- Parameters:
enableAdvancedFilter
- Set tofalse
to disable filtering.- Returns:
- the current instance of
ConfiguratorTableInputBuilder
- Since:
- 13.0 - Rampur
- See Also:
-
withEnableEditActions
Allows a user to edit values in the table.
Default =true
(the editing is enabled).Example:
def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .withEnableEditActions(false) .withRowTypes(rowTypes) .setLabel("Configurator Table") .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
enableEditActions
- Set tofalse
to disable editing.- Returns:
- the current instance of ConfiguratorTableInputBuilder
-
withEnableAddActions
Allows you to disable adding new rows to a table within a Configurator – the 'Add' button will be hidden whenenableAddActions
is set tofalse
. Adding new rows is enabled (true
) by default. This method enables or disables adding rows globally for the current ConfiguratorTable.
Adding an individual row can be enabled or disabled using theallowAdd
flag within the row type (seewithRowTypes(List)
) – which is not possible when adding new rows is disabled globally(enableAddActions=false)
.Example:
def columns = [[name: 'Product', label: 'Product', type: 'TEXT'], [name: 'Customer', label: 'Customer', type: 'TEXT'], [name: 'Feature', label: 'Feature', type: 'TEXT']] def rowTypes = [[label: 'addProduct', url: "URL_formula_ProductConfigurator"], [label: 'addCustomer', url: "URL_formula_CustomerConfigurator", allowAdd: false], [label: 'addFeature', url: "URL_formula_FeatureConfigurator", allowAdd: true]] def contextParameter = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .withRowTypes(rowTypes) //only 'addProduct' and 'addFeature' will be possible to add .withEnableAddActions(true) //can be omitted in this scenario, as
true
is default .buildContextParameter() def configuratorEntry = api.createConfiguratorEntry() configuratorEntry.createParameter(contextParameter) return configuratorEntry- Parameters:
enableAddActions
- Set tofalse
to turn off the 'Add' button visibility.- Returns:
- the current instance of ConfiguratorTableInputBuilder
- Since:
- 13.0 - Rampur
- See Also:
-
withEnableDuplicateActions
Allows a user to duplicate table rows.
Default =true
(duplicating a row is enabled).Example:
def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .withEnableDuplicateActions(false) .withRowTypes(rowTypes) .setLabel("Configurator Table") .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
enableDuplicateActions
-- Returns:
- the current instance of ConfiguratorTableInputBuilder
-
withEnableDeleteActions
Allows a user to delete table rows.
Default =true
(deleting is enabled).Example:
def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .withEnableDeleteActions(false) .withRowTypes(rowTypes) .setLabel("Configurator Table") .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
enableDeleteActions
-- Returns:
- the current instance of ConfiguratorTableInputBuilder
-
withRowTypes
Specifies row types that can be added to the ConfiguratorTable when a user clicks the 'Add' button to add a row.
Row types are specified by a list of maps, where each map contains thelabel
andurl
parameters. Use theuniqueName
of the Configurator logic as theurl
parameter.
You can also control whether a particular row type can be added by a user by defining theallowAdd
flag within each map.
Note: To disable adding rows to the ConfiguratorTable globally, refer towithEnableAddActions(boolean)
.Example:
def columns = [ [name: 'product', label: 'Product', type: 'TEXT'], [name: 'customer', label: 'Customer', type: 'TEXT'] def rowTypes = [ [label: 'addProduct', url: 'ProductConfigurator', allowAdd: true], [label: 'addCustomer', url: 'CustomerConfigurator', allowAdd: false] // this row type cannot be added by the user ] def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .setDefaultHeight(500) .setFixTableHeight(true) .withRowTypes(rowTypes) .setLabel("Configurator Table") .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
rowTypes
- A list of maps, each map representing a row type withlabel
andurl
parameters, and optionally anallowAdd
boolean to control the row type visibility in the 'Add' drop-down menu.- Returns:
- The current instance of
ConfiguratorTableInputBuilder
- See Also:
-
setDefaultHeight
Sets the maximum table height. If there are more entries than the defined default height the scroll bar appears.
Note:setFixTableHeight(boolean)
must be set totrue
to allow the height setting used bysetDefaultHeight
method.Example:
def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .setDefaultHeight(500) .setFixTableHeight(true) .withRowTypes(rowTypes) .setLabel("Configurator Table") .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
value
- height (in pixels)- Returns:
- the current instance of ConfiguratorTableInputBuilder
-
setFitFieldWidths
Sets whether fields (table cells) should autofit widths to title texts or the content.
Example:def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .withRowTypes(rowTypes) .setLabel("Configurator Table") .setFitFieldWidths(true) .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
value
-true
to enable,false
to disable fit field width- Returns:
- self
- Since:
- 12.0 - Clover Club
-
setFixTableHeight
Allows setting the table height using thesetDefaultHeight(int)
method.
Default =false
Example:
def ct = api.inputBuilderFactory() .createConfiguratorTable("ConfiguratorTableName") .setColumns(columns) .setDefaultHeight(500) .setFixTableHeight(true) .withRowTypes(rowTypes) .setLabel("Configurator Table") .buildContextParameter() def ce = api.createConfiguratorEntry() ce.createParameter(ct) return ce
- Parameters:
value
- set totrue
to enable setting the height- Returns:
- the current instance of ConfiguratorTableInputBuilder
-
withPreferenceName
Defines the preference name (whitespace and non-alphanumeric will be dropped).Example:
def contextParameter = api.inputBuilderFactory() .createConfiguratorTable('table') .withPreferenceName('someName') .buildContextParameter() contextParameter.getPreferenceName == 'someName'
- Parameters:
preferenceName
- name of the preference, cannot be whitespace or non-alphanumeric.- Returns:
- the current instance of
ConfiguratorTableInputBuilder
- Since:
- 13.0 - Rampur
- See Also:
-