Class HtmlOutput

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

public class HtmlOutput extends HtmlElement implements LabelableElement, ValidatableElement, FormFieldWithNameHistory
Wrapper for the HTML element "output".
See Also:
  • Field Details

  • Method Details

    • getDefaultStyleDisplay

      public HtmlElement.DisplayStyle getDefaultStyleDisplay()
      INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
      Returns the default display style.
      Overrides:
      getDefaultStyleDisplay in class HtmlElement
      Returns:
      the default display style
    • willValidate

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

      public void setCustomValidity(String message)
      Sets the custom validity message for the element to the specified message.
      Specified by:
      setCustomValidity in interface ValidatableElement
      Parameters:
      message - the new message
    • isValid

      public boolean isValid()
      Returns whether this element satisfies all form validation constraints set.
      Overrides:
      isValid in class HtmlElement
      Returns:
      whether this element satisfies all form validation constraints set
    • isCustomErrorValidityState

      public boolean isCustomErrorValidityState()
      Specified by:
      isCustomErrorValidityState in interface ValidatableElement
      Returns:
      a boolean value indicating whether the element's custom validity message has been set to a non-empty string by calling the element's setCustomValidity() method.
    • isValidValidityState

      public boolean isValidValidityState()
      Specified by:
      isValidValidityState in interface ValidatableElement
      Returns:
      true if the element meets all its validation constraints, and is therefore considered to be valid, or false if it fails any constraint. If true, the element matches the :valid CSS pseudo-class; the :invalid CSS pseudo-class otherwise.
    • setAttributeNS

      protected void setAttributeNS(String namespaceURI, String qualifiedName, String attributeValue, boolean notifyAttributeChangeListeners, boolean notifyMutationObservers)
      Sets the value of the attribute specified by namespace and qualified name.
      Overrides:
      setAttributeNS in class HtmlElement
      Parameters:
      namespaceURI - the URI that identifies an XML namespace
      qualifiedName - the qualified name (prefix:local) of the attribute
      attributeValue - the value of the attribute
      notifyAttributeChangeListeners - to notify the associated HtmlAttributeChangeListeners
      notifyMutationObservers - to notify MutationObservers or not
    • getOriginalName

      public String getOriginalName()
      Gets the first value of the name attribute of this field before any change.
      Specified by:
      getOriginalName in interface FormFieldWithNameHistory
      Returns:
      the original name (which is the same as the current one when no change has been made)
    • getNewNames

      public Collection<String> getNewNames()
      Get all the names this field got after the original one.
      Specified by:
      getNewNames in interface FormFieldWithNameHistory
      Returns:
      an empty collection if the name attribute has never been changed.