cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r159277 - cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding
Date Mon, 28 Mar 2005 18:38:42 GMT
Author: antonio
Date: Mon Mar 28 10:38:42 2005
New Revision: 159277

URL: http://svn.apache.org/viewcvs?view=rev&rev=159277
Log:
Sample mixing <fb:value> and <fb:javascript> for the same field

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-bind.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-data.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-def.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-bind.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-bind.xml?view=diff&r1=159276&r2=159277
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-bind.xml
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-bind.xml
Mon Mar 28 10:38:42 2005
@@ -45,5 +45,15 @@
       factorymethod="createBinding" >
       <fb:config prefixchar="[" suffixchar="]" />      
   </fb:custom>
-
+  
+  <!-- This works??? -->
+  <fb:value id="test" path="test-value" direction="load"/>
+  <fb:javascript id="test" path="test-value" direction="save">
+    <fb:save-form>
+      var formValue = widget.getValue();
+      // you can call a function from anywhere in the flowscript
+      var appValue = doSaveConversion(formValue, "-");
+      jxpathPointer.setValue(appValue);   
+    </fb:save-form>
+  </fb:javascript>
 </fb:context>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-data.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-data.xml?view=diff&r1=159276&r2=159277
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-data.xml
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-data.xml
Mon Mar 28 10:38:42 2005
@@ -19,4 +19,5 @@
   <jswrap-value>--something--</jswrap-value>
   <custom-value>**something more**</custom-value>
   <config-value>[[something else]]</config-value>
+  <test-value></test-value>
 </root>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-def.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-def.xml?view=diff&r1=159276&r2=159277
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-def.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/05custom-def.xml Mon
Mar 28 10:38:42 2005
@@ -18,22 +18,25 @@
 <fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
 
   <fd:widgets>
-  
-    <fd:field id="jswrap" >
+    <fd:field id="jswrap">
       <fd:label>1st Value</fd:label>
-      <fd:datatype base="string" />
+      <fd:datatype base="string"/>
     </fd:field>
 
-    <fd:field id="custom" >
+    <fd:field id="custom">
       <fd:label>2nd Value</fd:label>
-      <fd:datatype base="string" />
+      <fd:datatype base="string"/>
     </fd:field>
     
-    <fd:field id="config" >
+    <fd:field id="config">
       <fd:label>3rd Value</fd:label>
-      <fd:datatype base="string" />
+      <fd:datatype base="string"/>
     </fd:field>
     
+    <fd:field id="test">
+      <fd:label>4th Value</fd:label>
+      <fd:datatype base="string"/>
+    </fd:field>
   </fd:widgets>
   
 </fd:form>



Mime
View raw message