cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r517845 - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library: forms/ libraries/
Date Tue, 13 Mar 2007 20:10:01 GMT
Author: vgritsenko
Date: Tue Mar 13 13:10:00 2007
New Revision: 517845

URL: http://svn.apache.org/viewvc?view=rev&rev=517845
Log:
add cancel button with validate=false

Modified:
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_model.xml
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_template.xml
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second.xml
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second_binding.xml
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1.xml

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_model.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_model.xml?view=diff&rev=517845&r1=517844&r2=517845
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_model.xml
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_model.xml
Tue Mar 13 13:10:00 2007
@@ -15,56 +15,55 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<fd:form
-  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
-  
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+         xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
   <fd:widgets>
     <fd:import prefix="lib" uri="../libraries/library_form1-second.xml"/>
-    
+
     <fd:new id="lib:class1"/>
     <fd:expand id="lib:ext:field2"/>
-    
+
     <fd:field id="myField3" extends="lib:ext:field2">
-      <fd:label>Field3:</fd:label>    
-      <fd:datatype base="string"/>   
+      <fd:label>Field3:</fd:label>
+      <fd:datatype base="string"/>
       <fd:help>
         help test from the form model
         <small>Anyway, the point of all this was to show a popup help with mixed html
content.</small>
-      </fd:help>               
+      </fd:help>
     </fd:field>
-    
+
     <fd:field id="myField4" extends="lib:ext:field2">
-      <fd:label>Field4:</fd:label>    
-	    <fd:on-value-changed>
-	      <javascript>
-	        var newValue = event.source.value;
-	        java.lang.System.err.println("Was here! value=" + newValue);
-	        var field5 = event.source.parent.lookupWidget("myField5");		          
-	        field5.value = "model";
-	      </javascript>
-	    </fd:on-value-changed>      
+      <fd:label>Field4:</fd:label>
+      <fd:on-value-changed>
+        <javascript>
+          var newValue = event.source.value;
+          java.lang.System.err.println("Was here! value=" + newValue);
+          var field5 = event.source.parent.lookupWidget("myField5");
+          field5.value = "model";
+        </javascript>
+      </fd:on-value-changed>
     </fd:field>
-    
+
     <fd:field id="myField5" extends="lib:ext:field2">
-      <fd:label>Field5:</fd:label>    
-    </fd:field>   
-    
- 		<fd:field id="myEmail" extends="lib:ext:email" required="true">
-      <fd:validation> 		
-				<fd:length exact="10">
-				   <fd:failmessage>Must be 10 characters long</fd:failmessage>
-				</fd:length> 		
+      <fd:label>Field5:</fd:label>
+    </fd:field>
+
+    <fd:field id="myEmail" extends="lib:ext:email" required="true">
+      <fd:validation>
+        <fd:length exact="10">
+          <fd:failmessage>Must be 10 characters long</fd:failmessage>
+        </fd:length>
       </fd:validation>
- 		  <fd:datatype base="string"/>
-      <fd:label>Enter your customer's email adress: (inherited)</fd:label> 	

- 		</fd:field>
- 		
+      <fd:datatype base="string"/>
+      <fd:label>Enter your customer's email adress: (inherited)</fd:label>
+    </fd:field>
+
     <fd:field id="myAccount" extends="lib:ext:account">
       <fd:datatype base="string"/>
     </fd:field>
 
- 		<fd:field id="myAccount1" extends="lib:ext:account">
+    <fd:field id="myAccount1" extends="lib:ext:account">
       <fd:label>Indicate the size of your bank account (in m<sup>3</sup>):
(inherited)</fd:label>
       <fd:datatype base="string"/>
       <fd:selection-list>
@@ -75,27 +74,27 @@
         </fd:item>
         <fd:item value="9"/>
         <fd:item value="10"/>
-      </fd:selection-list> 		
- 		</fd:field>
- 		
+      </fd:selection-list>
+    </fd:field>
+
     <fd:multivaluefield id="myBeer" extends="lib:ext:drinks">
       <fd:validation>
         <fd:value-count exact="2"/>
       </fd:validation>
-      <fd:datatype base="string"/>    
+      <fd:datatype base="string"/>
       <fd:selection-list>
         <fd:item value="Amstel"/>
         <fd:item value="Heineken"/>
         <fd:item value="Erdinger"/>
         <fd:item value="Ottakringer"/>
       </fd:selection-list>
-    </fd:multivaluefield> 		
- 		
+    </fd:multivaluefield>
+
 
-   <fd:repeater id="contacts">
+    <fd:repeater id="contacts">
       <fd:validation>
         <fd:javascript>
-          java.lang.System.err.println("Validating");        
+          java.lang.System.err.println("Validating");
           return true;
         </fd:javascript>
       </fd:validation>
@@ -145,8 +144,9 @@
     <fd:repeater-action repeater="contacts" id="removecontacts" command="delete-rows"
select="select">
       <fd:label>Remove selected Contacts</fd:label>
     </fd:repeater-action>
-    
+
     <fd:new id="lib:rec-class-1"/>
-    
+
+    <fd:submit id="cancel" extends="lib:ext:cancel"/>
   </fd:widgets>
 </fd:form>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_template.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_template.xml?view=diff&rev=517845&r1=517844&r2=517845
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_template.xml
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/forms/form1_template.xml
Tue Mar 13 13:10:00 2007
@@ -16,9 +16,10 @@
   limitations under the License.
 -->
 <page xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
-  xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+      xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+      xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
   <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
+
   <title>Form libraries sample</title>
   <content>
     <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST">
@@ -30,14 +31,14 @@
           <ft:widget id="field2"/>
           <ft:widget id="myField3"/>
           <ft:widget id="myField4"/>
-          <ft:widget id="myField5"/>  
-          <ft:widget id="myBeer"/>                               
-          <ft:widget id="myEmail"/>   
+          <ft:widget id="myField5"/>
+          <ft:widget id="myBeer"/>
+          <ft:widget id="myEmail"/>
           <ft:widget id="myAccount"/>
-          <ft:widget id="myAccount1"/>      
+          <ft:widget id="myAccount1"/>
         </fi:items>
       </fi:group>
-      
+
       <ft:widget-label id="contacts"/><br/>
       <ft:repeater-size id="contacts"/>
       <table border="1">
@@ -78,7 +79,7 @@
           </td>
         </tr>
       </table>
-      
+
       <ft:class id="rec-class-1">
         <table border="1">
           <tr>
@@ -111,11 +112,11 @@
           </jx:choose>
         </table>
       </ft:class>
-      
+
       <p>
         <em>Recursive inter-library class/new inclusion madness:</em>
       </p>
-      
+
       <ft:class id="rec-class-2">
         <table border="1">
           <tr>
@@ -150,11 +151,12 @@
           </jx:choose>
         </table>
       </ft:class>
-      
+
       <ft:new id="rec-class-1"/>
-      
+
       <input type="submit"/>
-      
+      <ft:widget id="cancel"/>
+
     </ft:form-template>
   </content>
 </page>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second.xml?view=diff&rev=517845&r1=517844&r2=517845
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second.xml
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second.xml
Tue Mar 13 13:10:00 2007
@@ -15,11 +15,9 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<fd:library
-  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+<fd:library xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+            xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
   <fd:widgets>
-    
     <fd:import prefix="ext" uri="library_form1.xml"/>
     
     <fd:class id="class1" extends="ext:class1">
@@ -37,7 +35,7 @@
       <fd:widgets>
         <fd:repeater id="fields-rec-1">
           <fd:widgets>
-            
+
             <fd:field id="field-rec-1">
               <fd:label>Field (recursive) 1:</fd:label>
               <fd:datatype base="string"/>
@@ -71,14 +69,14 @@
       <fd:widgets>
         <fd:repeater id="fields-rec-2">
           <fd:widgets>
-            
+
             <fd:field id="field-rec-2">
               <fd:label>Field (recursive) 2:</fd:label>
               <fd:datatype base="string"/>
             </fd:field>
-            
+
             <fd:new id="rec-class-1"/>
-            
+
             <!-- these actions will act on the "tasks" repeater in which this class is
inlined -->
             <fd:row-action id="add" command="add-after">
               <fd:label>+</fd:label>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second_binding.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second_binding.xml?view=diff&rev=517845&r1=517844&r2=517845
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second_binding.xml
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1-second_binding.xml
Tue Mar 13 13:10:00 2007
@@ -15,11 +15,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<fb:library
-  xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
-  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
-  >
-  
+<fb:library xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
+            xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
   <fb:import prefix="ext" uri="library_form1_binding.xml"/>
   
   <fb:class id="class1" extends="ext:class1">

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1.xml?view=diff&rev=517845&r1=517844&r2=517845
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1.xml
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/library/libraries/library_form1.xml
Tue Mar 13 13:10:00 2007
@@ -15,9 +15,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<fd:library
-  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+<fd:library xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+            xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
   <fd:widgets>
   
   	<!-- macro -->
@@ -82,6 +81,10 @@
         <fd:item value="Coca Cola"/>
       </fd:selection-list>
     </fd:multivaluefield>    
-    
+
+    <fd:submit id="cancel" validate="false">
+      <fd:label>Cancel</fd:label>
+    </fd:submit>
+
   </fd:widgets>
 </fd:library>



Mime
View raw message