Next: Form creation - an
Up: No Title
Previous: A Simple Example
The Java Web Toolkit provides the class
public class Form extends CompoundItem
for HTML form processing.
Since the Form class has been defined as a sub-class
of CompoundItem, the addItem method can be applied
to a Form object to populate it with various objects
of the following types:
- CheckBox
- Radio
- Submit
- Reset
- TextField
- TextArea
- Select
- Hidden
- PasswordField
To create a Form object, the following steps must be
taken:
- Create a form object, specifying the METHOD attribute
(GET or POST), and the ACTION URL attribute.
- Populate the form object by creating one or more of the objects
to be included in the form and add it to the form using
the addItem method.
- Add the form object to the HtmlBody object.
Dr. Raj Sunderraman
7/2/1998