All Packages Class Hierarchy This Package Previous Next Index
Class net.strandberg.html.Form
java.lang.Object
|
+----net.strandberg.html.Form
- public class Form
- extends Object
- implements HTMLItem
The class Form is used to create HTML Forms
- Version:
- $Revision: 0.0 $
- Author:
- Mats Strandberg
-
Form(String, String)
- Constructs a new Form which will be representing an HTML Form
according to the arguments given to the constructor.
-
Form(String, String, boolean)
- Constructs a new Form which will be representing an HTML Form
according to the arguments given to the constructor.
-
Form(String, String, String)
- Constructs a new Form which will be representing an HTML Form
according to the arguments given to the constructor.
-
Form(String, String, String, boolean)
- Constructs a new Form which will be representing an HTML Form
according to the arguments given to the constructor.
-
addToBody(HTMLItem)
- Adds an HTML item to the body of this form
-
addToBody(String)
- Adds a string to the body of this form
-
addToPanel(HTMLItem)
- Adds an HTML item to the panel of this form.
-
onSubmit(JavaScript)
- Sets the function to be called when submitting the form.
-
onSubmit(String)
- Sets the function to be called when submitting the form.
-
setBorder(int)
- Sets the border of the table in which this form will be generated.
-
setCellSpacing(int)
- Sets the cell spacing of the table in which this form will be generated.
-
toHTML()
-
Returns HTML code presenting this Form.
Form
public Form(String method,
String action)
- Constructs a new Form which will be representing an HTML Form
according to the arguments given to the constructor.
The ENCTYPE parameter of the HTML form will be left out, which
defaults to "x-www-form-urlencoded" when the request is sent
from the client.
The Form will be presented formatted
as an HTML Table.
- Parameters:
- method - the method for sending the request to the server
- action - the action to be called (on the server) on submit
Form
public Form(String method,
String action,
boolean asTable)
- Constructs a new Form which will be representing an HTML Form
according to the arguments given to the constructor.
The ENCTYPE parameter of the HTML form will be left out, which
defaults to "x-www-form-urlencoded" when the request is sent
from the client.
- Parameters:
- method - the method for sending the request to the server
- action - the action to be called (on the server) on submit
- asTable - tells whether this form should be presented formatted
as an HTML Table
Form
public Form(String method,
String action,
String encoding)
- Constructs a new Form which will be representing an HTML Form
according to the arguments given to the constructor.
The Form will be presented formatted
as an HTML Table.
- Parameters:
- method - the method for sending the request to the server
- action - the action to be called (on the server) on submit
- encoding - will set the ENCTYPE parameter of this form. Could
be e.g. "x-www-form-urlencoded" or "multipart/form-data".
Form
public Form(String method,
String action,
String encoding,
boolean asTable)
- Constructs a new Form which will be representing an HTML Form
according to the arguments given to the constructor.
- Parameters:
- method - the method for sending the request to the server
- action - the action to be called (on the server) on submit
- encoding - will set the ENCTYPE parameter of this form. Could
be e.g. "x-www-form-urlencoded" or "multipart/form-data".
- asTable - tells whether this form should be presented formatted
as an HTML Table
onSubmit
public void onSubmit(String toDo)
- Sets the function to be called when submitting the form.
- Parameters:
- toDo - function to call on submit (before submitting)
onSubmit
public void onSubmit(JavaScript toDo)
- Sets the function to be called when submitting the form.
- Parameters:
- toDo - function to call on submit (before submitting)
setBorder
public void setBorder(int border)
- Sets the border of the table in which this form will be generated.
Setting the border (which is 0 by default) will have no effect on
a form that was not created to be generated as a table.
- Parameters:
- border - the thickness of the table border
setCellSpacing
public void setCellSpacing(int cellSpacing)
- Sets the cell spacing of the table in which this form will be generated.
Setting the cell spacing (which is 0 by default) will have no effect on
a form that was not created to be generated as a table.
- Parameters:
- cellSpacing - the thickness of the table border
addToBody
public void addToBody(HTMLItem item)
- Adds an HTML item to the body of this form
- Parameters:
- item - HTMLItem to add
addToBody
public void addToBody(String s)
- Adds a string to the body of this form
- Parameters:
- s - string to add
addToPanel
public void addToPanel(HTMLItem item)
- Adds an HTML item to the panel of this form. The panel will be generated as
a separate, centered part at the bottom end of the form
- Parameters:
- item - HTMLItem to add
toHTML
public String toHTML()
- Returns HTML code presenting this Form.
All Packages Class Hierarchy This Package Previous Next Index