|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.forms.formmodel.AbstractWidget org.apache.cocoon.forms.formmodel.AbstractContainerWidget
public abstract class 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(..) |
Widget |
getChild(String id)
Concrete widgets that contain actual child widgets should override to return the actual child-widget. |
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 Widget
initialize
in class AbstractWidget
public void addChild(Widget widget)
ContainerWidget
addChild
in interface ContainerWidget
public boolean hasChild(String id)
ContainerWidget
hasChild
in interface ContainerWidget
public Widget getChild(String id)
AbstractWidget
getChild
in interface ContainerWidget
getChild
in class AbstractWidget
id
- of the child-widget
null
if not overriden.public Iterator getChildren()
getChildren
in interface ContainerWidget
public 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 Widget
formContext
- 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 Widget
validate
in class AbstractWidget
true
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 AbstractWidget
contentHandler
- 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 |