public class

FormElement

extends Element
java.lang.Object
   ↳ com.google.gwt.core.client.JavaScriptObject
     ↳ com.google.gwt.dom.client.Node
       ↳ com.google.gwt.dom.client.Element
         ↳ com.google.gwt.dom.client.FormElement

Class Overview

The FORM element encompasses behavior similar to a collection and an element. It provides direct access to the contained form controls as well as the attributes of the form element.

Summary

[Expand]
Inherited Constants
From class com.google.gwt.dom.client.Node
Protected Constructors
FormElement()
Public Methods
static FormElement as(Element elem)
Assert that the given Element is compatible with this class and automatically typecast it.
final String getAcceptCharset()
List of character sets supported by the server.
final String getAction()
Server-side form handler.
final NodeCollection<Element> getElements()
Returns a collection of all form control elements in the form.
final String getEnctype()
The content type of the submitted form, generally "application/x-www-form-urlencoded".
final String getMethod()
HTTP method [IETF RFC 2616] used to submit form.
final String getName()
Names the form.
final String getTarget()
Frame to render the resource in.
final void reset()
Restores a form element's default values.
final void setAcceptCharset(String acceptCharset)
List of character sets supported by the server.
final void setAction(String action)
Server-side form handler.
final void setEnctype(String enctype)
The content type of the submitted form, generally "application/x-www-form-urlencoded".
final void setMethod(String method)
HTTP method [IETF RFC 2616] used to submit form.
final void setName(String name)
Names the form.
final void setTarget(String target)
Frame to render the resource in.
final void submit()
Submits the form.
[Expand]
Inherited Methods
From class com.google.gwt.dom.client.Element
From class com.google.gwt.dom.client.Node
From class com.google.gwt.core.client.JavaScriptObject
From class java.lang.Object

Protected Constructors

protected FormElement ()

Public Methods

public static FormElement as (Element elem)

Assert that the given Element is compatible with this class and automatically typecast it.

public final String getAcceptCharset ()

List of character sets supported by the server.

public final String getAction ()

Server-side form handler.

public final NodeCollection<Element> getElements ()

Returns a collection of all form control elements in the form.

public final String getEnctype ()

The content type of the submitted form, generally "application/x-www-form-urlencoded". Note: The onsubmit even handler is not guaranteed to be triggered when invoking this method. The behavior is inconsistent for historical reasons and authors should not rely on a particular one.

public final String getMethod ()

HTTP method [IETF RFC 2616] used to submit form.

public final String getName ()

Names the form.

public final String getTarget ()

Frame to render the resource in.

public final void reset ()

Restores a form element's default values. It performs the same action as a reset button.

public final void setAcceptCharset (String acceptCharset)

List of character sets supported by the server.

public final void setAction (String action)

Server-side form handler.

public final void setEnctype (String enctype)

The content type of the submitted form, generally "application/x-www-form-urlencoded". Note: The onsubmit even handler is not guaranteed to be triggered when invoking this method. The behavior is inconsistent for historical reasons and authors should not rely on a particular one.

public final void setMethod (String method)

HTTP method [IETF RFC 2616] used to submit form.

public final void setName (String name)

Names the form.

public final void setTarget (String target)

Frame to render the resource in.

public final void submit ()

Submits the form. It performs the same action as a submit button.