Class Hidden

All Implemented Interfaces:
IsEditor<LeafValueEditor<String>>, HasAttachHandlers, HasHandlers, EventListener, TakesValue<String>, HasName, HasVisibility, IsWidget

public class Hidden extends Widget implements HasName, TakesValue<String>, IsEditor<LeafValueEditor<String>>
Represents a hidden field in an HTML form.
  • Constructor Details

    • Hidden

      public Hidden()
      Constructor for Hidden.
    • Hidden

      public Hidden(String name)
      Constructor for Hidden.
      Parameters:
      name - name of the hidden field
    • Hidden

      public Hidden(String name, String value)
      Constructor for Hidden.
      Parameters:
      name - name of the hidden field
      value - value of the hidden field
    • Hidden

      protected Hidden(Element element)
      This constructor may be used by subclasses to explicitly use an existing element. This element must be an <input> element whose type is 'hidden'.
      Parameters:
      element - the element to be used
  • Method Details

    • wrap

      public static Hidden wrap(Element element)
      Creates a Hidden widget that wraps an existing <input type='hidden'> element. This element must already be attached to the document. If the element is removed from the document, you must call Widget.removeFromParent().
      Parameters:
      element - the element to be wrapped
    • asEditor

      public LeafValueEditor<String> asEditor()
      Description copied from interface: IsEditor
      Returns the Editor encapsulated by the view object.
      Specified by:
      asEditor in interface IsEditor<LeafValueEditor<String>>
      Returns:
      an Editor of type E
    • getDefaultValue

      public String getDefaultValue()
      Gets the default value of the hidden field.
      Returns:
      the default value
    • getID

      public String getID()
      Gets the id of the hidden field.
      Returns:
      the id
    • getName

      public String getName()
      Gets the name of the hidden field.
      Specified by:
      getName in interface HasName
      Returns:
      the name
    • getValue

      public String getValue()
      Gets the value of the hidden field.
      Specified by:
      getValue in interface TakesValue<String>
      Returns:
      the value
      See Also:
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
      Sets the default value of the hidden field.
      Parameters:
      defaultValue - default value to set
    • setID

      public void setID(String id)
      Sets the id of the hidden field.
      Parameters:
      id - id to set
    • setName

      public void setName(String name)
      Sets the name of the hidden field.
      Specified by:
      setName in interface HasName
      Parameters:
      name - name of the field
    • setValue

      public void setValue(String value)
      Sets the value of the hidden field.
      Specified by:
      setValue in interface TakesValue<String>
      Parameters:
      value - value to set
      See Also: