Package com.uc4.api

Class FormItemText

All Implemented Interfaces:
IFormItem

public class FormItemText extends AbstractFormItem
This class is used for text input fields and date fields.
  • Constructor Details

    • FormItemText

      public FormItemText(Element textElement)
      Constructs a new FormItemText using the specified XML element.
      Parameters:
      textElement - XML element
  • Method Details

    • isText

      public boolean isText()
      Description copied from interface: IFormItem
      Returns true if this form item is a text input field. A cast to FormItemText can be done if this method returns true.
      Specified by:
      isText in interface IFormItem
      Overrides:
      isText in class AbstractFormItem
      Returns:
      Boolean indicating if this item is a text input field
    • isPassword

      public boolean isPassword()
      Returns 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 field
      Returns:
      Boolean which is set to true
    • isDate

      public boolean isDate()
      Returns true if this input field is a date field.
      Returns:
      Boolean indicating whether this field is a date
    • getInputCheck

      public String getInputCheck()
      Returns a String 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

      public boolean isValid(String test)
      Tests if the parameter test is a valid input.
      Parameters:
      test - Value which should be tested
      Returns:
      True if test is a valid
    • setValue

      public void setValue(String value)
      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

      public String 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 interface IFormItem
      Overrides:
      isValid in class AbstractFormItem
      Returns:
      Boolean indicating if this IFormItem is valid.