All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class w3c.jigsaw.forms.FormCardResource
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.FormCardResource
  -  public class FormCardResource
  
-  extends PostableResource
  
  
  -  
	FormCardResource(FormResource, FormCardHandler, String, String)
   -   Create a new form card.
 
  
  -  
	addButton(String)
   -   Add a new button.
  
 -  
	addField(FormFieldInterface)
   -   Add a new field to this form.
  
 -  
	delete()
   -   Mark this card as removed.
  
 -  
	dump(HtmlGenerator)
   -   Dump this card into the given HtmlGenerator.
  
 -  
	get(Request)
   -   Get this form card entity.
  
 -  
	getName()
   -   Get this card name.
  
 -  
	getTitle()
   -   Get this card title.
  
 -  
	handle(Request, URLDecoder)
   -   Handle a post to this card.
  
 -  
	isDeleted()
   -   Is this card deleted ?
  
 -  
	lookup(LookupState, LookupResult)
   -   Our own lookup, to implement multiple buttons:
  
 -  
	lookupField(String)
   -   Lookup a field in this card.
  
 -  
	removeField(String)
   -   remove the field whose name is given.
  
 -  
	rename(String)
   -  
  
 -  
	reset()
   -   Reset this form card.
  
 -  
	setOkLabel(String)
   -   Set the Ok button label.
  
 -  
	setResetLabel(String)
   -   Set the reset button label.
  
 -  
	updateField(String, String)
   -   Update the field whose name is given, with the provided value.
 
  
FormCardResource
 protected FormCardResource(FormResource form,
                            FormCardHandler handler,
                            String name,
                            String title)
  -  Create a new form card.
 Users of the package should create new form cards through the form 
 object itself.
  
    -  Parameters:
    
 -  form - The form we are attached to.
    
-  handler - This card form handler.
    
-  name - This card's name,
    
-  title - The card displayed title.
  
    
 
 
  
delete
 public synchronized void delete()
  -  Mark this card as removed.
  
    -  Overrides:
    
 -  delete in class HTTPResource
  
 
 
 
isDeleted
 public synchronized boolean isDeleted()
  -  Is this card deleted ?
 
setOkLabel
 public void setOkLabel(String label)
  -  Set the Ok button label.
  
    -  Parameters:
    
 -  label - The label to use for the commit button.
  
 
 
 
setResetLabel
 public void setResetLabel(String label)
  -  Set the reset button label.
  
    -  Parameters:
    
 -  label - The label to use for the reset button.
  
 
 
 
lookup
 public boolean lookup(LookupState ls,
                       LookupResult lr) throws HTTPException
  -  Our own lookup, to implement multiple buttons:
  
    -  Overrides:
    
 -  lookup in class FilteredResource
  
 
 
 
getName
 public String getName()
  -  Get this card name.
 
rename
 public void rename(String name)
getTitle
 public String getTitle()
  -  Get this card title.
  
    -  Overrides:
    
 -  getTitle in class HTTPResource
  
 
 
 
dump
 protected void dump(HtmlGenerator g)
  -  Dump this card into the given HtmlGenerator.
  
    -  Parameters:
    
 -  into - The HtmlGenerator to dump ourself into.
  
 
 
 
addField
 public void addField(FormFieldInterface field)
  -  Add a new field to this form.
  
    -  Parameters:
    
 -  field - The field to add.
  
 
 
 
addButton
 public void addButton(String label)
  -  Add a new button.
 Button click are simulated, the form handler will get notified of
 them through the notifyButtonClick callback.
  
    -  Parameters:
    
 -  label - The button name.
  
 
 
 
removeField
 public void removeField(String name)
  -  remove the field whose name is given.
  
    -  Parameters:
    
 -  name - The name of the field to remove.
  
 
 
 
reset
 public void reset()
  -  Reset this form card.
 Remove all the fields and all the buttons defined for this card.
 
lookupField
 public FormFieldInterface lookupField(String name)
  -  Lookup a field in this card.
  
    -  Parameters:
    
 -  name - The name of the field to look for.
    
 -  Returns:
    
 -  An instance of FormFieldInterface or null
    if none was found.
  
 
 
 
updateField
 protected void updateField(String name,
                            String value) throws FormFieldException
  -  Update the field whose name is given, with the provided value.
  
    -  Parameters:
    
 -  name - The field name.
    
-  value - The new value for this field.
    
  -  Throws: HTTPException
    
 -  If the field couldn't be set.
  
 
 
 
get
 public Reply get(Request request) throws HTTPException
  -  Get this form card entity.
 This dumps the whole form (including the card button controlers).
  
    -  Parameters:
    
 -  request - The request to handle.
    
 -  Returns:
    
 -  A Reply instance.
    
 -  Throws: HTTPException
    
 -  If the request couldn't be handled.
    
 -  Overrides:
    
 -  get in class PostableResource
  
 
 
 
handle
 public synchronized Reply handle(Request request,
                                  URLDecoder data) throws HTTPException
  -  Handle a post to this card.
 This method is synchronized so that only one thread of control executes 
 the sequence of 
notifyBeginProcessing, 
 notifyEndProcessing and notifyChange.
  
    -  Parameters:
    
 -  client - The clien tthat issued the request.
    
-  request - The request to fullfill.
    
-  data - The form data.
    
   -  Throws: HTTPException
    
 -  If the form processing erred.
    
 -  Overrides:
    
 -  handle in class PostableResource
  
 
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index