cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r155773 - in cocoon/trunk/src/blocks/forms: java/org/apache/cocoon/forms/formmodel/Form.java samples/forms/carselector_form.xml
Date Tue, 01 Mar 2005 13:22:47 GMT
Author: reinhard
Date: Tue Mar  1 05:22:45 2005
New Revision: 155773

URL: http://svn.apache.org/viewcvs?view=rev&rev=155773
Log:
events (on-change, on-action) didn't work with forms that had an ID

Modified:
    cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Form.java
    cocoon/trunk/src/blocks/forms/samples/forms/carselector_form.xml

Modified: cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Form.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Form.java?view=diff&r1=155772&r2=155773
==============================================================================
--- cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Form.java (original)
+++ cocoon/trunk/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/Form.java Tue Mar
 1 05:22:45 2005
@@ -225,6 +225,11 @@
         this.submitWidget = null;
         String submitId = formContext.getRequest().getParameter("forms_submit_id");
         if (submitId != null && submitId.length() > 0) {
+            // if the form has an ID, it is used as part of the submitId too
+            // this has ID has to be cut off
+            if(this.getId() != null) {
+                submitId = submitId.substring(submitId.indexOf('.')+1);
+            }
             StringTokenizer stok = new StringTokenizer(submitId, ".");
             Widget submit = this;
             while (stok.hasMoreTokens()) {

Modified: cocoon/trunk/src/blocks/forms/samples/forms/carselector_form.xml
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/carselector_form.xml?view=diff&r1=155772&r2=155773
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/carselector_form.xml (original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/carselector_form.xml Tue Mar  1 05:22:45 2005
@@ -17,7 +17,8 @@
 <!-- form used to illustrate programmatic changing of listbox content. -->
 <fd:form
   xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+  id="carselector">
 
   <fd:widgets>
     <fd:field id="make" required="true">



Mime
View raw message