apache > cocoon
 
Font size:      

Cocoon Forms: action widget (2.1 legacy document)

Warning
This document was copied as is from the Cocoon 2.1 documentation, but has not yet been fully reviewed or moved to its new home.

Concept

Used to trigger an action event on the server side. Usually presented as a button the user can press (though this is not required). When an action widget was activated, validation will not be performed. This is because usually it would be strange to have other fields validated when the user's intention wasn't really to submit the form. If you want validation to happen, use the submit widget. After pressing an action button, the form will normally always be redisplayed, unless the event handling code explicitely disables this (by using the method endFormProcessing method on the Form object).

Configuration

<fd:action id="..." action-command="...">
  <fd:label>...</fd:label>
  <fd:help>...</fd:help>
  <fd:hint>...</fd:hint>
  <fd:on-action>
    ...
  </fd:on-action>
</fd:action>

The action-command attribute specifies a name that will be part of the event generated by this widget. It can be used to distinguish events originated from this fd:action from another one.

For more information on how event handlers are defined, see Event Handling. The interface to be implemented for Java event listeners is org.apache.cocoon.forms.event.ActionListener. The WidgetEvent subclass is org.apache.cocoon.forms.event.ActionEvent.

Comments

add your comments