All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.jigsaw.forms.FormResource

java.lang.Object
   |
   +----w3c.tools.store.AttributeHolder
           |
           +----w3c.tools.store.Resource
                   |
                   +----w3c.jigsaw.resources.HTTPResource
                           |
                           +----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 CACHE_CONTROL_NOCACHE
 o PRAGMA_NOCACHE
 o vcards

Constructor Index

 o FormResource()
 o FormResource(ResourceContext, 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[])
Setup the list of allowed methods.
 o lookup(LookupState, LookupResult)
Lookup an sub resource.
 o removeFormCard(String)
Remove a card from the form.
 o renameCard(String, String)

Variables

 o CACHE_CONTROL_NOCACHE
 protected static HttpCacheControl CACHE_CONTROL_NOCACHE
 o PRAGMA_NOCACHE
 protected static HttpTokenList PRAGMA_NOCACHE
 o vcards
 protected Vector vcards

Constructors

 o FormResource
 public FormResource(ResourceContext context,
                     String url)
 o FormResource
 public FormResource()

Methods

 o lookup
 public boolean lookup(LookupState ls,
                       LookupResult lr) 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:
ls - The current lookup state.
Returns:
An HTTPResource matching the name to lookup, or null if none was found.
Overrides:
lookup in class FilteredResource
 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 renameCard
 public void renameCard(String oldname,
                        String newname)
 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[])
Setup the list of allowed methods.

Overrides:
initialize in class PostableResource

All Packages  Class Hierarchy  This Package  Previous  Next  Index