Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 44345 invoked from network); 18 Nov 2005 04:31:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Nov 2005 04:31:20 -0000 Received: (qmail 43243 invoked by uid 500); 18 Nov 2005 04:24:35 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 33120 invoked by uid 500); 18 Nov 2005 04:21:44 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 23805 invoked by uid 99); 18 Nov 2005 04:20:34 -0000 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 17 Nov 2005 20:17:42 -0800 Received: (qmail 8372 invoked by uid 65534); 18 Nov 2005 04:15:58 -0000 Message-ID: <20051118041558.8371.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r345438 [265/286] - in /cocoon/site/site/2.1: ./ developing/ developing/portal/ developing/portal/coplets/ developing/webapps/ developing/webapps/authentication/ faq/ howto/ installing/ plan/ plan/documentation/ plan/otherplanning/ plan/ove... Date: Fri, 18 Nov 2005 04:13:22 -0000 To: cvs@cocoon.apache.org From: crossley@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Added: cocoon/site/site/2.1/userdocs/widgets/widget_submit.html URL: http://svn.apache.org/viewcvs/cocoon/site/site/2.1/userdocs/widgets/widget_submit.html?rev=345438&view=auto ============================================================================== --- cocoon/site/site/2.1/userdocs/widgets/widget_submit.html (added) +++ cocoon/site/site/2.1/userdocs/widgets/widget_submit.html Thu Nov 17 20:00:02 2005 @@ -0,0 +1,1311 @@ + + + + + + + +Submit widget + + + + + + + + + +
+ + + +
+ + + + + + + + + + + + +
+
+
+
+ +
+ + +
+ +
+ +   +
+ + + + + +
+

Submit widget

+ +

Concept

+
+

The submit widget, usually rendered as a button, is used by the user to +submit the form. The submit widget is a special kind of action widget, thus also +has the same functionality as an action widget, however the submit widget does +trigger validation and its purpose is to end the form.

+

You don't need to use a submit widget to submit a form. For example, in your +HTML template you can simply put:

+
<input type="submit"/>
+

to be able to submit the form. Using a submit widget enables some extra +functionality. You can control whether validation should be performed. You can +put multiple submit widgets on a form and add different event handlers to them. +

+

While a submit widget has the explicit purpose to submit a form, a form can +also be submitted by other widgets. One example is the already mentioned +action widget. It is however also possible to +automatically submit a form when a widget changes its value, so that server-side +event value-changed event listeners can be triggerd. This can be specified using +<fi:styling submit-on-change="true"/> in the form template (see +XSLT for more information on the fi:styling +directive).

+

To know which widget caused the form to be submitted, use the method +getSubmitWidget of the Form object.

+
+ +

Definition

+
+
<fd:submit id="..." command="..." validate="true|false" state="...">
+  <fd:label>...</fd:label>
+  <fd:help>...</fd:help>
+  <fd:hint>...</fd:hint>
+  <fd:on-action>
+    [...]
+  </fd:on-action>
+  <fd:on-create>
+    [...]
+  </fd:on-create>
+  <fd:attributes>
+    <fd:attribute name="..." value="..."/>
+  </fd:attributes>
+</fd:submit>
+

The optional attribute validate, which is true by default, can be used to +disable validation. The difference between an action widget and a submit widget +with validate="false" is that a submit widget with validate="false" will end +form processing, thus the form will not be redisplayed. Ultimately, it is of +course the controller who decides this, but the forms hint towards the +controller is that it shouldn't be redisplayed, and this is exactly what the +flowscript integration library does.

+
+ +

Template & styling

+
+

See the action widget.

+ +
+
+ +
 
+
+ + + Propchange: cocoon/site/site/2.1/userdocs/widgets/widget_submit.html ------------------------------------------------------------------------------ svn:eol-style = native