Class FormElementTag

All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
CheckTag, ComboTag, FileUploadTag, InputTag, SingleTag, TextboxTag

public abstract class FormElementTag extends ElementTag
A class for supporting JSP tags that generate HTML input elements.
Since:
1.0
Version:
10.0
Author:
Luke
See Also:
  • Field Details

    • _value

      protected Object _value
      The value of this input element.
  • Constructor Details

    • FormElementTag

      protected FormElementTag(String elementName, boolean validateParent)
      Generates an input element tag with a given name.
      Parameters:
      elementName - the HTML element name
      validateParent - TRUE if parent validation is enabled, otherwise FALSE
      See Also:
  • Method Details

    • setName

      public void setName(String name)
      Sets the name of this field.
      Parameters:
      name - the field name
    • setIdx

      public void setIdx(String index)
      Sets the tab index of this field. This does nothing if a negative, zero or non-numeric value is passed.
      Parameters:
      index - the tab index, or * if it should be retrieved from the parent form.
      See Also:
    • setValue

      public void setValue(Object value)
      Sets the value of this input element. Each implementer needs to render multiple values appropriately.
      Parameters:
      value - the value(s) for this field
    • setRequired

      public void setRequired(boolean isRequired)
      Sets this field as required for HTML5 browsers.
      Parameters:
      isRequired - TRUE if required, otherwise FALSE
    • setDelimValues

      public void setDelimValues(String values)
      Sets multiple values for this input element.
      Parameters:
      values - a comma-delimited list of values
    • validateState

      protected void validateState()
      Validates tag state.
      Throws:
      IllegalStateException - if not in a FORM and is required