Class w3c.jigsaw.forms.FormCardResource
All Packages Class Hierarchy This Package Previous Next Index
Class w3c.jigsaw.forms.FormCardResource
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.FormCardResource
- public class FormCardResource
- extends PostableResource
-
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)
- Our own lookup, to implement multiple buttons:
-
lookupField(String)
- Lookup a field in this card.
-
removeField(String)
- remove the field whose name is given.
-
reset()
- Reset this form card.
-
updateField(String, String)
- Update the field whose name is given, with the provided value.
delete
public synchronized void delete()
- Mark this card as removed.
isDeleted
public synchronized boolean isDeleted()
- Is this card deleted ?
lookup
public HTTPResource lookup(LookupState state) throws HTTPException
- Our own lookup, to implement multiple buttons:
- Overrides:
- lookup in class ContainerResource
getName
public String getName()
- Get this card 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).
- 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