org.jdesktop.html.form
Interface Form

All Known Implementing Classes:
AbstractForm

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.


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

getBaseUrl

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.

getAction

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.

getMethod

Method getMethod()
Gets the HTTP Method to use when the form is submitted.

Returns:
the Method to use on submit.

getInputs

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.

getInput

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.

getEncoding

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.