|
||||||||||
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.Action
public class Action
An Action widget. An Action widget can cause an ActionEvent
to be triggered
on the server side, which will be handled by either the event handlers defined in the
form definition, and/or by the FormHandler
registered with the form, if any. An Action widget can e.g. be rendered as a button,
or as a hidden field which gets its value set by javascript. The Action widget will generate its associated
ActionEvent when a requestparameter is present with as name the id of this Action widget, and as
value a non-empty value.
Field Summary | |
---|---|
protected ActionDefinition |
definition
|
Constructor Summary | |
---|---|
Action(ActionDefinition definition)
|
Method Summary | |
---|---|
void |
broadcastEvent(WidgetEvent event)
Broadcast an event previously queued by this widget to its event listeners. |
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. |
String |
getId()
Gets the id of this widget. |
protected void |
handleActivate()
Handle the fact that this action was activated. |
void |
readFromRequest(FormContext formContext)
Lets this widget read its data from a request. |
boolean |
validate(FormContext formContext)
Always return true (an action has no validation) |
Methods inherited from class org.apache.cocoon.woody.formmodel.AbstractWidget |
---|
addValidator, generateItemSaxFragment, generateSaxFragment, getForm, getFullyQualifiedId, getLocation, getNamespace, getParent, getValue, getWidget, isRequired, removeValidator, setDefinition, setLocation, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ActionDefinition definition
Constructor Detail |
---|
public Action(ActionDefinition definition)
Method Detail |
---|
public String getId()
AbstractWidget
getId
in interface Widget
getId
in class AbstractWidget
public void readFromRequest(FormContext formContext)
Widget
protected void handleActivate()
public boolean validate(FormContext formContext)
true
(an action has no validation)
validate
in interface Widget
validate
in class AbstractWidget
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
public void broadcastEvent(WidgetEvent event)
Widget
broadcastEvent
in interface Widget
broadcastEvent
in class AbstractWidget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |