Groovy Documentation

org.jdesktop.html.form
[Java] Interface Form


public interface Form

Represents the model portion of the HTML <form&gh; element. It does not represent any information related to the structure of the HTML document (for example, there is no id or name property), or any visual information.

Authors:
rbair


Method Summary
String getAction()

Returns the url that should be used when the form is submitted.

String getBaseUrl()

Returns the base url.

Encoding getEncoding()

Returns the Encoding used with this Form.

Input getInput(String name)

Gets the Input with the given name.

Input[] getInputs()

Gets the array of Inputs for this Form.

Method getMethod()

Gets the HTTP Method to use when the form is submitted.

 

Method Detail

getAction

public String getAction()
Returns the url that should be used when the form is submitted.
Returns:
a string representing the url to use. This may be a relative or absolute url.


getBaseUrl

public String getBaseUrl()
Returns the base url. The getAction() method is appended to this base url to form the target url, if the action is a relative url.
Returns:
a string representing the base url, or null if there is not one.


getEncoding

public Encoding getEncoding()
Returns the Encoding used with this Form. By default, this is UrlEncoded. The encoding is honored when submitting the form.
Returns:
a non-null value for the Encoding for this Form.


getInput

public Input getInput(String name)
Gets the Input with the given name. If more than one Input has this name, it is unspecified which will be returned.
Returns:
the Input with the given name. May be null.


getInputs

public Input[] getInputs()
Gets the array of Inputs for this Form.
Returns:
an array of Inputs. The ordering of elements in this array is not guaranteed.


getMethod

public Method getMethod()
Gets the HTTP Method to use when the form is submitted.
Returns:
the Method to use on submit.


 

Groovy Documentation