Class HtmlResetInput

All Implemented Interfaces:
Serializable, Cloneable, DisabledElement, FormFieldWithNameHistory, LabelableElement, SubmittableElement, ValidatableElement, Element, Node

public class HtmlResetInput extends HtmlInput implements LabelableElement
Wrapper for the HTML element "input".
See Also:
  • Field Details

    • DEFAULT_VALUE

      public static final String DEFAULT_VALUE
      Value to use if no specified value attribute.
      See Also:
  • Method Details

    • doClickStateUpdate

      protected boolean doClickStateUpdate(boolean shiftKey, boolean ctrlKey) throws IOException
      This method implements the control state update part of the click action.

      The default implementation only calls doClickStateUpdate on parent's DomElement (if any). Subclasses requiring different behavior (like HtmlSubmitInput) will override this method.

      Overrides:
      doClickStateUpdate in class DomElement
      Parameters:
      shiftKey - true if SHIFT is pressed
      ctrlKey - true if CTRL is pressed
      Returns:
      true if doClickFireEvent method has to be called later on (to signal, that the value was changed)
      Throws:
      IOException - if an IO error occurs
    • setValue

      public void setValue(String newValue)
      Sets the value.
      Overrides:
      setValue in class HtmlInput
      Parameters:
      newValue - the new value
    • setDefaultChecked

      public void setDefaultChecked(boolean defaultChecked)
      Sets the default checked state to use when this element gets reset, if applicable. The default implementation is empty; only checkboxes and radio buttons really care what the default checked value is.
      Specified by:
      setDefaultChecked in interface SubmittableElement
      Parameters:
      defaultChecked - the default checked state to use when this element gets reset, if applicable
      See Also:
    • reset

      public void reset()
      Returns the value of this element to the default value or checked state (usually what it was at the time the page was loaded, unless it has been modified via JavaScript). This method does nothing for reset input elements.
      Specified by:
      reset in interface SubmittableElement
      Overrides:
      reset in class HtmlInput
      See Also:
    • isRequiredSupported

      protected boolean isRequiredSupported()
      Returns whether this element supports the required constraint.
      Overrides:
      isRequiredSupported in class HtmlInput
      Returns:
      whether this element supports the required constraint
    • willValidate

      public boolean willValidate()
      Specified by:
      willValidate in interface ValidatableElement
      Overrides:
      willValidate in class HtmlInput
      Returns:
      whether the element is a candidate for constraint validation