|
||||||||||
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.Union
public class Union
A discriminated union that references a discriminant value in another widget and contains one of several cases (widgets). To have a case hold more than one widget or to use a different id for the case than for the widget id, just wrap the widget(s) in a container widget named with the desired case id.
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 | |
---|---|
Union(UnionDefinition definition)
|
Method Summary | |
---|---|
void |
generateItemsSaxFragment(ContentHandler contentHandler,
Locale locale)
|
void |
generateSaxFragment(ContentHandler contentHandler,
Locale locale)
Generates an XML representation of this widget. |
String |
getElementName()
|
Object |
getValue()
Returns the value of the widget. |
Widget |
getWidget(String id)
Gets the child widget of this widget with the given id, or null if there isn't such a child. |
void |
readFromRequest(FormContext formContext)
Lets this widget read its data from a request. |
void |
resolve()
|
void |
setParent(Widget widget)
This method is called on a widget when it is added to a container. |
boolean |
validate(FormContext formContext)
Validates this widget and returns the outcome. |
Methods inherited from class org.apache.cocoon.woody.formmodel.AbstractContainerWidget |
---|
addWidget, generateSaxFragment, getChildren, hasWidget |
Methods inherited from class org.apache.cocoon.woody.formmodel.AbstractWidget |
---|
addValidator, broadcastEvent, generateItemSaxFragment, generateLabel, generateSaxFragment, getForm, getFullyQualifiedId, getId, getLocation, getNamespace, getParent, isRequired, removeValidator, setDefinition, setLocation, 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, generateLabel, getForm, getFullyQualifiedId, getId, getLocation, getNamespace, getParent, isRequired, setValue |
Constructor Detail |
---|
public Union(UnionDefinition definition)
Method Detail |
---|
public void setParent(Widget widget)
Widget
setParent
in interface Widget
setParent
in class AbstractWidget
public void resolve()
public String getElementName()
public Object getValue()
Widget
getValue
in interface Widget
getValue
in class AbstractWidget
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 Widget getWidget(String id)
Widget
getWidget
in interface ContainerWidget
getWidget
in interface Widget
getWidget
in class AbstractContainerWidget
public void generateItemsSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException
SAXException
public void generateSaxFragment(ContentHandler contentHandler, Locale locale) throws SAXException
Widget
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |