com.google.gwt.user.client.ui

## Class Hidden

- java.lang.Object
- - com.google.gwt.user.client.ui.UIObject
  - - com.google.gwt.user.client.ui.Widget
    - - com.google.gwt.user.client.ui.Hidden

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

      public class Hidden
      extends Widget
      implements HasName, TakesValue<java.lang.String>, IsEditor<LeafValueEditor<java.lang.String>>

  Represents a hidden field in an HTML form.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

      `UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

  - ### Field Summary

    - ### Fields inherited from class com.google.gwt.user.client.ui.Widget

      `eventsToSink`

    - ### Fields inherited from class com.google.gwt.user.client.ui.UIObject

      `DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `Hidden()` Constructor for `Hidden`.
    `protected` | `Hidden(Element element)` This constructor may be used by subclasses to explicitly use an existing element.
    `` | `Hidden(java.lang.String name)` Constructor for `Hidden`.
    `` | `Hidden(java.lang.String name, java.lang.String value)` Constructor for `Hidden`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LeafValueEditor<java.lang.String>` | `asEditor()` Returns the Editor encapsulated by the view object.
    `java.lang.String` | `getDefaultValue()` Gets the default value of the hidden field.
    `java.lang.String` | `getID()` Gets the id of the hidden field.
    `java.lang.String` | `getName()` Gets the name of the hidden field.
    `java.lang.String` | `getValue()` Gets the value of the hidden field.
    `void` | `setDefaultValue(java.lang.String defaultValue)` Sets the default value of the hidden field.
    `void` | `setID(java.lang.String id)` Sets the id of the hidden field.
    `void` | `setName(java.lang.String name)` Sets the name of the hidden field.
    `void` | `setValue(java.lang.String value)` Sets the value of the hidden field.
    `static Hidden` | `wrap(Element element)` Creates a Hidden widget that wraps an existing <input type='hidden'> element.

    - ### Methods inherited from class com.google.gwt.user.client.ui.Widget

      `addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEvents`

    - ### Methods inherited from class com.google.gwt.user.client.ui.UIObject

      `addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Hidden

          public Hidden()

      Constructor for `Hidden`.

    - #### Hidden

          public Hidden(java.lang.String name)

      Constructor for `Hidden`.
      Parameters:
        `name` - name of the hidden field

    - #### Hidden

          public Hidden(java.lang.String name,
                        java.lang.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 Detail

    - #### 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 `RootPanel.detachNow(Widget)`.
      Parameters:
        `element` - the element to be wrapped

    - #### asEditor

          public LeafValueEditor<java.lang.String> asEditor()

      Description copied from interface: `IsEditor`
      Returns the Editor encapsulated by the view object.
      Specified by:
        `asEditor` in interface `IsEditor<LeafValueEditor<java.lang.String>>`
      Returns:
        an `Editor` of type E

    - #### getDefaultValue

          public java.lang.String getDefaultValue()

      Gets the default value of the hidden field.
      Returns:
        the default value

    - #### getID

          public java.lang.String getID()

      Gets the id of the hidden field.
      Returns:
        the id

    - #### getName

          public java.lang.String getName()

      Gets the name of the hidden field.
      Specified by:
        `getName` in interface `HasName`
      Returns:
        the name

    - #### getValue

          public java.lang.String getValue()

      Gets the value of the hidden field.
      Specified by:
        `getValue` in interface `TakesValue<java.lang.String>`
      Returns:
        the value
      See Also:
        `TakesValue.setValue(V)`

    - #### setDefaultValue

          public void setDefaultValue(java.lang.String defaultValue)

      Sets the default value of the hidden field.
      Parameters:
        `defaultValue` - default value to set

    - #### setID

          public void setID(java.lang.String id)

      Sets the id of the hidden field.
      Parameters:
        `id` - id to set

    - #### setName

          public void setName(java.lang.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(java.lang.String value)

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