|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.woody.formmodel.AbstractWidget org.apache.cocoon.woody.formmodel.AbstractContainerWidget org.apache.cocoon.woody.formmodel.Form
public class Form
A widget that serves as a container for other widgets, the top-level widget in a form description file.
Field Summary |
---|
Fields inherited from class org.apache.cocoon.woody.formmodel.AbstractContainerWidget |
---|
widgets |
Fields inherited from class org.apache.cocoon.woody.formmodel.AbstractWidget |
---|
definition |
Constructor Summary | |
---|---|
Form(FormDefinition definition)
|
Method Summary | |
---|---|
void |
addProcessingPhaseListener(ProcessingPhaseListener listener)
|
void |
addWidgetEvent(WidgetEvent event)
Events produced by child widgets should not be fired immediately, but queued in order to ensure an overall consistency of the widget tree before being handled. |
boolean |
doValidate(FormContext formContext)
|
void |
endProcessing(boolean redisplayForm)
End the current form processing after the current phase. |
void |
generateLabel(ContentHandler contentHandler)
Generates SAX events for the label of this widget. |
void |
generateSaxFragment(ContentHandler contentHandler,
Locale locale)
Generates an XML representation of this widget. |
Object |
getAttribute(String name)
|
Locale |
getLocale()
Get the locale to be used to process this form. |
Widget |
getSubmitWidget()
Get the widget that triggered the current processing. |
boolean |
isValid()
Was form validation successful ? |
boolean |
process(FormContext formContext)
Processes a form submit. |
void |
readFromRequest(FormContext formContext)
Lets this widget read its data from a request. |
void |
removeAttribute(String name)
|
void |
removeProcessingPhaseListener(ProcessingPhaseListener listener)
|
void |
setAttribute(String name,
Object value)
|
void |
setFormHandler(FormHandler formHandler)
|
void |
setSubmitWidget(Widget widget)
Set the widget that triggered the current form processing. |
boolean |
validate(FormContext formContext)
Validates this widget and returns the outcome. |
Methods inherited from class org.apache.cocoon.woody.formmodel.AbstractContainerWidget |
---|
addWidget, generateSaxFragment, getChildren, getWidget, hasWidget |
Methods inherited from class org.apache.cocoon.woody.formmodel.AbstractWidget |
---|
addValidator, broadcastEvent, generateItemSaxFragment, generateSaxFragment, getForm, getFullyQualifiedId, getId, getLocation, getNamespace, getParent, getValue, isRequired, removeValidator, setDefinition, setLocation, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.woody.formmodel.Widget |
---|
broadcastEvent, getForm, getFullyQualifiedId, getId, getLocation, getNamespace, getParent, getValue, isRequired, setParent, setValue |
Constructor Detail |
---|
public Form(FormDefinition definition)
Method Detail |
---|
public void addWidgetEvent(WidgetEvent event)
event
- the event to queuepublic Locale getLocale()
public Widget getSubmitWidget()
public void setSubmitWidget(Widget widget)
widget
- the widgetpublic void setFormHandler(FormHandler formHandler)
public void addProcessingPhaseListener(ProcessingPhaseListener listener)
public void removeProcessingPhaseListener(ProcessingPhaseListener listener)
public boolean process(FormContext formContext)
isValid()
method.
Form processing consists in multiple steps:
readFromRequest(FormContext)
is called recursively on
the whole widget tree)
endProcessing(boolean)
.
public void endProcessing(boolean redisplayForm)
redisplayForm
- indicates if the form should be redisplayed to the user.public boolean isValid()
true
if the form was successfully validated.public void readFromRequest(FormContext formContext)
Widget
readFromRequest
in interface Widget
readFromRequest
in class AbstractContainerWidget
public boolean validate(FormContext formContext)
Widget
Widget.generateSaxFragment(ContentHandler, Locale)
method.
validate
in interface Widget
validate
in class AbstractContainerWidget
public boolean doValidate(FormContext formContext)
public Object getAttribute(String name)
public void setAttribute(String name, Object value)
public void removeAttribute(String name)
public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException
Widget
SAXException
public void generateLabel(ContentHandler contentHandler) throws SAXException
Widget
generateLabel
in interface Widget
generateLabel
in class AbstractWidget
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |