All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class websphinx.Form

java.lang.Object
   |
   +----websphinx.Region
           |
           +----websphinx.Element
                   |
                   +----websphinx.Link
                           |
                           +----websphinx.Form

public class Form
extends Link
<FORM> element in an HTML page.


Constructor Index

 o Form(Tag, Tag, URL)
Make a LinkElement from a start tag and end tag and a base URL (for relative references).

Method Index

 o getMethod()
Get the method used to access this link.
 o makeQuery()
Construct the query that would be submitted if the form's SUBMIT button were pressed.
 o makeQuery(FormButton)
Construct the query that would be submitted if the specified button were pressed.
 o urlFromHref(Tag, URL)
Construct the URL for this form, from its start tag and a base URL (for relative references).

Constructors

 o Form
 public Form(Tag startTag,
             Tag endTag,
             URL base) throws MalformedURLException
Make a LinkElement from a start tag and end tag and a base URL (for relative references). The tags must be on the same page.

Parameters:
startTag - Start tag of element
endTag - End tag of element
base - Base URL used for relative references

Methods

 o urlFromHref
 protected URL urlFromHref(Tag tag,
                           URL base) throws MalformedURLException
Construct the URL for this form, from its start tag and a base URL (for relative references).

Parameters:
tag - Start tag of form.
base - Base URL used for relative references
Returns:
URL to which the button points
Overrides:
urlFromHref in class Link
 o getMethod
 public int getMethod()
Get the method used to access this link.

Returns:
GET or POST.
Overrides:
getMethod in class Link
 o makeQuery
 public URL makeQuery()
Construct the query that would be submitted if the form's SUBMIT button were pressed.

Returns:
a URL representing the submitted form, or null if the form cannot be represented as a URL.
 o makeQuery
 public URL makeQuery(FormButton button)
Construct the query that would be submitted if the specified button were pressed.

Parameters:
button - form button that triggers the submission.
Returns:
a URL representing the submitted form, or null if the form cannot be represented as a URL.

All Packages  Class Hierarchy  This Package  Previous  Next  Index