Package com.uc4.api
Class FormItemText
java.lang.Object
com.uc4.api.AbstractFormItem
com.uc4.api.FormItemText
- All Implemented Interfaces:
IFormItem
This class is used for text input fields and date fields.
-
Constructor Summary
ConstructorsConstructorDescriptionFormItemText
(Element textElement) Constructs a newFormItemText
using the specified XML element. -
Method Summary
Modifier and TypeMethodDescriptionReturns aString
containing the term that determines how the user input should be checked.int
Returns the maximum number of allowed characters.getValue()
Returns the current value.boolean
isDate()
Returnstrue
if this input field is a date field.boolean
Returnstrue
if this input field is a password field.boolean
isText()
Returnstrue
if this form item is a text input field.boolean
isValid()
Tests if the current value a valid input for this field.boolean
Tests if the parametertest
is a valid input.void
Sets a new value for this field.Methods inherited from class com.uc4.api.AbstractFormItem
getId, getLabel, isFixed, isLabel, isList, isNewLine, isNumber, isRequired, isUppercase
-
Constructor Details
-
FormItemText
Constructs a newFormItemText
using the specified XML element.- Parameters:
textElement
- XML element
-
-
Method Details
-
isText
public boolean isText()Description copied from interface:IFormItem
Returnstrue
if this form item is a text input field. A cast toFormItemText
can be done if this method returnstrue
.- Specified by:
isText
in interfaceIFormItem
- Overrides:
isText
in classAbstractFormItem
- Returns:
- Boolean indicating if this item is a text input field
-
isPassword
public boolean isPassword()Returnstrue
if this input field is a password field. The entered value is not visible in the report if this input field is a password field- Returns:
- Boolean which is set to true
-
isDate
public boolean isDate()Returnstrue
if this input field is a date field.- Returns:
- Boolean indicating whether this field is a date
-
getInputCheck
Returns aString
containing the term that determines how the user input should be checked.- Returns:
- Input Check
-
getMaxLength
public int getMaxLength()Returns the maximum number of allowed characters.- Returns:
- max length for value
-
isValid
Tests if the parametertest
is a valid input.- Parameters:
test
- Value which should be tested- Returns:
- True if test is a valid
-
setValue
Description copied from interface:IFormItem
Sets a new value for this field. This method can throw an exception if the input is not valid.- Parameters:
value
- New value
-
getValue
Description copied from interface:IFormItem
Returns the current value. If a default value is set this method can be used to read the default value.- Returns:
- Value of this field
-
isValid
public boolean isValid()Description copied from interface:IFormItem
Tests if the current value a valid input for this field.- Specified by:
isValid
in interfaceIFormItem
- Overrides:
isValid
in classAbstractFormItem
- Returns:
- Boolean indicating if this
IFormItem
is valid.
-