Class w3c.jigsaw.forms.FormResource
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.forms.FormResource

java.lang.Object
   |
   +----w3c.jigsaw.resources.AttributeHolder
           |
           +----w3c.jigsaw.resources.Resource
                   |
                   +----w3c.jigsaw.resources.HTTPResource
                           |
                           +----w3c.jigsaw.resources.ContainerResource
                                   |
                                   +----w3c.jigsaw.resources.FilteredResource
                                           |
                                           +----w3c.jigsaw.resources.FileResource
                                                   |
                                                   +----w3c.jigsaw.forms.PostableResource
                                                           |
                                                           +----w3c.jigsaw.forms.FormResource

public class FormResource
extends PostableResource
This class implements a high level interface to forms. A FormResource is a resource made of form cards. Each card is made of a set of typed fields.

Variable Index

 o vcards

Constructor Index

 o FormResource()
 o FormResource(String)

Method Index

 o defineCard(FormCardHandler, String, String)
Define a new form card, with a specific handler.
 o dump(HtmlGenerator, FormCardResource)
Dump this form content, the given card being selected.
 o dumpFooter(HtmlGenerator)
Add some footer after the form dump.
 o dumpHeader(HtmlGenerator)
Add some header before the form dumps itself.
 o get(Request)
Get this form resource.
 o initialize(Object[])
Initialize a filtered resource.
 o lookup(LookupState)
Lookup an sub resource.
 o removeFormCard(String)
Remove a card from the form.

Variables

 o vcards
  protected Vector vcards

Constructors

 o FormResource
  public FormResource(String url)
 o FormResource
  public FormResource()

Methods

 o lookup
  public HTTPResource lookup(LookupState state) throws HTTPException
Lookup an sub resource. Each form card makes its own resource, that's why the lookup method for this resource is special.
Parameters:
state - The current lookup state.
Returns:
An HTTPResource matching the name to lookup, or null if none was found.
Overrides:
lookup in class ContainerResource
 o defineCard
  public FormCardResource defineCard(FormCardHandler handler,
                                     String name,
                                     String title)
Define a new form card, with a specific handler.
Parameters:
handler - The handler for this specific card.
name - The form card name.
title - The form card title.
 o removeFormCard
  public void removeFormCard(String name)
Remove a card from the form.
Parameters:
name - The name of the card to remove.
 o dumpHeader
  public void dumpHeader(HtmlGenerator into)
Add some header before the form dumps itself.
Parameters:
into - The html generator to dump the header to.
 o dumpFooter
  public void dumpFooter(HtmlGenerator into)
Add some footer after the form dump.
Parameters:
into - The html generator to dump the header to.
 o dump
  protected void dump(HtmlGenerator g,
                      FormCardResource selected)
Dump this form content, the given card being selected.
Parameters:
card - The selected card.
 o get
  public Reply get(Request request) throws HTTPException
Get this form resource. This defaults to get the first card for this resource.
Parameters:
request - The request to process.
Throws: HTTPException
If processing the request failed.
Overrides:
get in class PostableResource
 o initialize
  public void initialize(Object values[])
Initialize a filtered resource.
Overrides:
initialize in class FilteredResource

All Packages  Class Hierarchy  This Package  Previous  Next  Index