|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.cocoon.forms.formmodel.AbstractWidget
org.apache.cocoon.forms.formmodel.AbstractContainerWidget
A general-purpose abstract Widget which can hold zero or more widgets.
| Field Summary | |
protected ValidationError |
validationError
validation errors on container widgets |
protected WidgetList |
widgets
List of contained widgets. |
| Fields inherited from class org.apache.cocoon.forms.formmodel.AbstractWidget |
wasValid |
| Fields inherited from interface org.apache.cocoon.forms.formmodel.Widget |
PATH_SEPARATOR |
| Constructor Summary | |
AbstractContainerWidget(AbstractContainerDefinition definition)
Constructs AbstractContainerWidget |
|
| Method Summary | |
void |
addChild(Widget widget)
Adds a child widget. |
void |
generateItemSaxFragment(ContentHandler contentHandler,
Locale locale)
Subclass container widgets can call this super.generateItemSaxFragment(..) to just insert the child-widget content wrapped in a @lt;fi:widgets@gt; |
Widget |
getChild(String id)
Gets the child widget with the given id. |
Iterator |
getChildren()
|
int |
getSize()
|
boolean |
hasChild(String id)
Checks if there is a child widget with the given id. |
void |
initialize()
Called after widget's environment has been setup, to allow for any contextual initalization such as looking up case widgets for union widgets. |
void |
readFromRequest(FormContext formContext)
Delegates the readFromRequest() down to the contained child-widgets. |
boolean |
validate()
Delegates the validate() down to the contained child-widgets,
and validates the extra rules on this containment level regardless of
children widget's validities. |
| Methods inherited from class org.apache.cocoon.forms.formmodel.AbstractWidget |
addValidator, broadcastEvent, generateDisplayData, generateLabel, generateSaxFragment, getAttribute, getCombinedState, getDefinition, getForm, getFullName, getId, getLocation, getName, getParent, getRequestParameterName, getState, getValue, getWidget, getXMLElementAttributes, getXMLElementName, isRequired, isValid, lookupWidget, removeAttribute, removeValidator, setAttribute, setParent, setState, setValue, toString, widgetNameChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.cocoon.forms.formmodel.Widget |
addValidator, broadcastEvent, generateLabel, generateSaxFragment, getAttribute, getCombinedState, getDefinition, getForm, getFullName, getId, getLocation, getName, getParent, getRequestParameterName, getState, getValue, getWidget, isRequired, isValid, lookupWidget, removeAttribute, removeValidator, setAttribute, setParent, setState, setValue |
| Field Detail |
protected WidgetList widgets
protected ValidationError validationError
| Constructor Detail |
public AbstractContainerWidget(AbstractContainerDefinition definition)
| Method Detail |
public void initialize()
initialize in interface Widgetinitialize in class AbstractWidgetpublic void addChild(Widget widget)
ContainerWidget
addChild in interface ContainerWidgetpublic boolean hasChild(String id)
ContainerWidget
hasChild in interface ContainerWidgetpublic Widget getChild(String id)
ContainerWidget
getChild in interface ContainerWidgetgetChild in class AbstractWidgetid - of the child-widget
null if not overriden.public Iterator getChildren()
getChildren in interface ContainerWidgetpublic int getSize()
public void readFromRequest(FormContext formContext)
super.readFromRequest()
to allow child-widgets to process the request.
Overide only to add possible request-reading statements on the containment level.
readFromRequest in interface WidgetformContext - to be passed to the Widget.readFromRequest(FormContext)
of the contained widgets.public boolean validate()
validate() down to the contained child-widgets,
and validates the extra rules on this containment level regardless of
children widget's validities.
When overriding one should call super.validate() as the first
statement to keep in sync with this behaviour.
validate in interface Widgetvalidate in class AbstractWidgettrue only if all contained widgets are valid and the
extra validation rules on this containment level are ok.Widget.validate()
public void generateItemSaxFragment(ContentHandler contentHandler,
Locale locale)
throws SAXException
generateItemSaxFragment in class AbstractWidgetcontentHandler - where the SAX is sent to via Widget.generateSaxFragment(ContentHandler, Locale)locale -
SAXException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||