Class SimpleInputBuilder<VT>
- Object
-
- AbstractInputBuilder<SimpleInputBuilder,VT>
-
- SimpleInputBuilder<VT>
-
public class SimpleInputBuilder<VT> extends AbstractInputBuilder<SimpleInputBuilder,VT>
Builder class for basic input types.
-
-
Field Summary
-
Fields inherited from class AbstractInputBuilder
builderContext, cp
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimpleInputBuilder(InputBuilderContext builderContext, String paramName, InputType inputType, String functionName)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected Object
_getInput()
SimpleInputBuilder
setDataType(String dataType)
Sets the data type of the input field.
Example:SimpleInputBuilder
setDecimalPlaces(String mode)
N/A - the method has not been implemented in the user interface yet.SimpleInputBuilder
setFormatType(String formatType)
Sets the format type of the input field.
Example:SimpleInputBuilder
setFrom(Float from)
Sets the minimum allowed value for the input field.SimpleInputBuilder
setFrom(Date from)
Sets the minimum allowed date value for the input field.SimpleInputBuilder
setInputType(String inputType)
Sets the input type of the field.
Example:SimpleInputBuilder
setList(List list)
N/A - the method has not been implemented in the user interface yet.SimpleInputBuilder
setMax(Integer max)
Deprecated, for removal: This API element is subject to removal in a future version.as of 7.7.0, use insteadsetTo
SimpleInputBuilder
setMax(Date max)
Deprecated, for removal: This API element is subject to removal in a future version.as of 7.7.0, use insteadsetTo
SimpleInputBuilder
setMaxLength(Integer maxLen)
N/A - the method has not been implemented in the user interface yet.SimpleInputBuilder
setMin(Integer min)
Deprecated, for removal: This API element is subject to removal in a future version.as of 7.7.0, use insteadsetFrom
SimpleInputBuilder
setMin(Date min)
Deprecated, for removal: This API element is subject to removal in a future version.as of 7.7.0, use insteadsetFrom
SimpleInputBuilder
setMinLength(Integer minLen)
N/A - the method has not been implemented in the user interface yet.SimpleInputBuilder
setRichTextEditor(boolean rte)
N/A - the method has not been implemented in the user interface yet.SimpleInputBuilder
setRounding(boolean doRound)
N/A - the method has not been implemented in the user interface yet.SimpleInputBuilder
setTo(Float to)
Sets the maximum allowed value for the input field.SimpleInputBuilder
setTo(Date to)
Sets the maximum allowed date value for the input field.-
Methods inherited from class AbstractInputBuilder
addOrUpdateInput, addToConfiguratorEntry, addToConfiguratorEntry, buildContextParameter, buildMap, getInput, setAccessCode, setAlign, setAlwaysEditable, setAppearance, setAutoComplete, setAutoFocus, setCaption, setConfigValues, setCustomAttributeName, setCustomAttributeValue, setDisabled, setDisplayMode, setErrorMessage, setExportable, setFlex, setHelpLink, setHelpText, setIcon, setIconPosition, setImportable, setLabel, setLabelPlacement, setLabelStyle, setLabelTranslations, setLayoutGridName, setNoRefresh, setParameterGroup, setPlaceholderText, setReadOnly, setRequired, setSize, setSuccessMessage, setTheme, setTitle, setUserGroupEdit, setUserGroupView, setValue, setValueHint, setWarningMessage
-
-
-
-
Constructor Detail
-
SimpleInputBuilder
protected SimpleInputBuilder(InputBuilderContext builderContext, String paramName, InputType inputType, String functionName)
-
-
Method Detail
-
setDataType
public SimpleInputBuilder setDataType(String dataType)
Sets the data type of the input field.
Example:def dateFormat = "yyyy-MM-dd" def maxDate = api.parseDate(dateFormat, "2021-10-17") def dateEntry = api.inputBuilderFactory() .createDateUserEntry("date") .setLabel("Date") .setPlaceholderText("date to 2021-10-17") .setDataType("DATE") .setFormatType(dateFormat) .setTo(maxDate) .buildContextParameter()
- Parameters:
dataType
- The type of the data.- Returns:
- self
-
setFormatType
public SimpleInputBuilder setFormatType(String formatType)
Sets the format type of the input field.
Example:def userEntry = api.inputBuilderFactory() .createUserEntry("Percentage") .setLabel("Percentage") .setPlaceholderText("Value between 35% and 60%") .setFormatType("PERCENT") .setFrom(0.35) .setTo(0.60)
- Parameters:
formatType
- The maximum value.- Returns:
- self
-
setInputType
public SimpleInputBuilder setInputType(String inputType)
Sets the input type of the field.
Example:- Parameters:
inputType
- Type fo the input, ex. "range"- Returns:
- self
-
setRounding
public SimpleInputBuilder setRounding(boolean doRound)
N/A - the method has not been implemented in the user interface yet.- Parameters:
doRound
- The rounding mechanism turn on (true) or off (false)- Returns:
- self
-
setDecimalPlaces
public SimpleInputBuilder setDecimalPlaces(String mode)
N/A - the method has not been implemented in the user interface yet.- Parameters:
mode
- The decimal places of an element to display in the UI- Returns:
- self
-
setMax
@Deprecated(since="7.7.0", forRemoval=true) public SimpleInputBuilder setMax(Integer max)
Deprecated, for removal: This API element is subject to removal in a future version.as of 7.7.0, use insteadsetTo
Sets the maximum allowed value for the entry. The property set with this method is 'to'. Please notice that this method only accepts integer values, and no overloaded version of this method that accepts decimals exist. To use decimals, please use the replacement,setTo
.- Parameters:
max
- maximum value- Returns:
- self
-
setTo
public SimpleInputBuilder setTo(Float to)
Sets the maximum allowed value for the input field. When set, a user will not be able to select a higher value than specified by this method.
Applicable to the following input types: INTEGERUSERENTRY, USERENTRY
Example:def userEntry = api.inputBuilderFactory() .createUserEntry("Percentage") .setLabel("Percentage") .setPlaceholderText("Value between 10% and 20%") .setFormatType("PERCENT") .setFrom(0.1) .setTo(0.2)
- Parameters:
to
- The maximum value.- Returns:
- self
- Since:
- 8.0 - Godfather
-
setMax
@Deprecated(since="7.7.0", forRemoval=true) public SimpleInputBuilder setMax(Date max)
Deprecated, for removal: This API element is subject to removal in a future version.as of 7.7.0, use insteadsetTo
Sets the maximum allowed date value for the entry. The property set with this method is 'to'- Parameters:
max
- maximum date value- Returns:
- self
-
setTo
public SimpleInputBuilder setTo(Date to)
Sets the maximum allowed date value for the input field. When set, a user will not be able to select a higher date than specified by this method.
Use together withsetFrom(Date)
to specify the date range.Applicable to the following input types: DATETIMEUSERENTRY (accepts date limits only), DATEUSERENTRY
Example:def dateFormat = "yyyy-MM-dd" def maxDate = api.parseDate(dateFormat, "2021-10-17") def dateEntry = api.inputBuilderFactory() .createDateUserEntry("date") .setLabel("Date") .setPlaceholderText("date to 2021-10-17") .setFormatType(dateFormat) .setTo(maxDate)
- Parameters:
to
- The maximum date.- Returns:
- self
- Since:
- 8.0 - Godfather
-
setMaxLength
public SimpleInputBuilder setMaxLength(Integer maxLen)
N/A - the method has not been implemented in the user interface yet.- Parameters:
maxLen
- The maximum length allowed for the input field.- Returns:
- self
-
setMin
@Deprecated(since="7.7.0", forRemoval=true) public SimpleInputBuilder setMin(Integer min)
Deprecated, for removal: This API element is subject to removal in a future version.as of 7.7.0, use insteadsetFrom
Sets the minimum allowed value for the entry. The property set with this method is 'from'. Please notice that this method only accepts integer values, and no overloaded version of this method that accepts decimals exist. To use decimals, please use the replacement,setFrom
.- Parameters:
min
- minimum value- Returns:
- self
-
setFrom
public SimpleInputBuilder setFrom(Float from)
Sets the minimum allowed value for the input field. When set, a user will not be able to select a lower value than specified by this method.
Applicable to the following input types: INTEGERUSERENTRY, USERENTRYExample:
def userEntry = api.inputBuilderFactory() .createUserEntry("Percentage") .setLabel("Percentage") .setPlaceholderText("Value between 10% and 20%") .setFormatType("PERCENT") .setFrom(0.1) .setTo(0.2)
- Parameters:
from
- The minimum value.- Returns:
- self
- Since:
- 8.0 - Godfather
-
setMin
@Deprecated(since="7.7.0", forRemoval=true) public SimpleInputBuilder setMin(Date min)
Deprecated, for removal: This API element is subject to removal in a future version.as of 7.7.0, use insteadsetFrom
Sets the minimum allowed date value for the entry. The property set with this method is 'from'- Parameters:
min
- minimum date value- Returns:
- self
-
setFrom
public SimpleInputBuilder setFrom(Date from)
Sets the minimum allowed date value for the input field. When set, a user will not be able to select a lower date than specified by this method.
Use together withsetTo(Date)
to specify the date range.Applicable to the following input types: DATETIMEUSERENTRY (accepts date limits only), DATEUSERENTRY
Example:
def dateFormat = "yyyy-MM-dd" def minDate = api.parseDate(dateFormat, "2021-10-02") def dateEntry = api.inputBuilderFactory() .createDateUserEntry("date") .setLabel("Date") .setPlaceholderText("date from 2021-10-02") .setFormatType(dateFormat) .setFrom(minDate)
- Parameters:
from
- The minimum date.- Returns:
- self
- Since:
- 8.0 - Godfather
-
setMinLength
public SimpleInputBuilder setMinLength(Integer minLen)
N/A - the method has not been implemented in the user interface yet.- Parameters:
minLen
- The minimum length allowed for the input field.- Returns:
- self
-
setList
public SimpleInputBuilder setList(List list)
N/A - the method has not been implemented in the user interface yet.- Parameters:
list
- To be defined- Returns:
- self
-
setRichTextEditor
public SimpleInputBuilder setRichTextEditor(boolean rte)
N/A - the method has not been implemented in the user interface yet.- Parameters:
rte
- true for the usage of RichTextEditor- Returns:
- self
-
_getInput
protected Object _getInput()
- Specified by:
_getInput
in classAbstractInputBuilder<SimpleInputBuilder,VT>
-
-