public class FormItemText extends AbstractFormItem
Constructor and Description |
---|
FormItemText(org.w3c.dom.Element textElement)
Constructs a new
FormItemText using the specified XML element. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getInputCheck()
Returns a
String containing the term that determines how the user input should be checked. |
int |
getMaxLength()
Returns the maximum number of allowed characters.
|
java.lang.String |
getValue()
Returns the current value.
|
boolean |
isDate()
Returns
true if this input field is a date field. |
boolean |
isPassword()
Returns
true if this input field is a password field. |
boolean |
isText()
Returns
true if this form item is a text input field. |
boolean |
isValid()
Tests if the current value a valid input for this field.
|
boolean |
isValid(java.lang.String test)
Tests if the parameter
test is a valid input. |
void |
setValue(java.lang.String value)
Sets a new value for this field.
|
getId, getLabel, isFixed, isLabel, isList, isNewLine, isNumber, isRequired, isUppercase
public FormItemText(org.w3c.dom.Element textElement)
FormItemText
using the specified XML element.textElement
- XML elementpublic boolean isText()
IFormItem
true
if this form item is a text input field.
A cast to FormItemText
can be done if this method returns true
.isText
in interface IFormItem
isText
in class AbstractFormItem
public boolean isPassword()
true
if this input field is a password field.
The entered value is not visible in the report if this input field is a password fieldpublic boolean isDate()
true
if this input field is a date field.public java.lang.String getInputCheck()
String
containing the term that determines how the user input should be checked.public int getMaxLength()
public boolean isValid(java.lang.String test)
test
is a valid input.test
- Value which should be testedpublic void setValue(java.lang.String value)
IFormItem
value
- New valuepublic java.lang.String getValue()
IFormItem
public boolean isValid()
IFormItem
isValid
in interface IFormItem
isValid
in class AbstractFormItem
IFormItem
is valid.