| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <head> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>Cocoon Forms: action widget</title> |
| <link href="http://purl.org/DC/elements/1.0/" rel="schema.DC"> |
| <meta content="The Apache Cocoon Team" name="DC.Creator"> |
| </head> |
| <body> |
| |
| <h1>Concept</h1> |
| |
| <p>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 <a href="widget_submit.html">submit widget</a>. |
| After pressing an action |
| button, the form will normally always be redisplayed, unless the event |
| handling code explicitely disables this (by using the method <span class="codefrag">endFormProcessing</span> |
| method on the <span class="codefrag">Form</span> object).</p> |
| |
| |
| |
| <h1>Configuration</h1> |
| |
| <pre class="code"><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></pre> |
| |
| |
| <p>The <strong>action-command</strong> 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.</p> |
| |
| |
| <p>For more information on how event handlers are defined, see |
| <a href="eventhandling.html">Event Handling</a>. The interface |
| to be implemented for Java event listeners is |
| <span class="codefrag">org.apache.cocoon.forms.event.ActionListener</span>. |
| The WidgetEvent subclass is <span class="codefrag">org.apache.cocoon.forms.event.ActionEvent</span>.</p> |
| |
| |
| </body> |
| </html> |