cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r158091 - in cocoon/whiteboard/forms/samples/swan: data/complex_template.xml data/medium_template.xml data/simple_template.xml flow/swan.js forms/binding_mb.xml forms/model_mb.xml forms/sitemap_mb.xml forms/swan_mb.xml forms/swan_mm.xml forms/template_mb.xml forms/xreport_mb.xml
Date Fri, 18 Mar 2005 16:36:05 GMT
Author: tim
Date: Fri Mar 18 08:36:03 2005
New Revision: 158091

URL: http://svn.apache.org/viewcvs?view=rev&rev=158091
Log:
Change from using setters to using '='.
Change from binding view-selector state to
statically settting state to invisible.
Change some $Id$ comments.

Modified:
    cocoon/whiteboard/forms/samples/swan/data/complex_template.xml
    cocoon/whiteboard/forms/samples/swan/data/medium_template.xml
    cocoon/whiteboard/forms/samples/swan/data/simple_template.xml
    cocoon/whiteboard/forms/samples/swan/flow/swan.js
    cocoon/whiteboard/forms/samples/swan/forms/binding_mb.xml
    cocoon/whiteboard/forms/samples/swan/forms/model_mb.xml
    cocoon/whiteboard/forms/samples/swan/forms/sitemap_mb.xml
    cocoon/whiteboard/forms/samples/swan/forms/swan_mb.xml
    cocoon/whiteboard/forms/samples/swan/forms/swan_mm.xml
    cocoon/whiteboard/forms/samples/swan/forms/template_mb.xml
    cocoon/whiteboard/forms/samples/swan/forms/xreport_mb.xml

Modified: cocoon/whiteboard/forms/samples/swan/data/complex_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/data/complex_template.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/data/complex_template.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/data/complex_template.xml Fri Mar 18 08:36:03 2005
@@ -19,7 +19,7 @@
   xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
 
     <!--
-      CVS $Id$
+      @version $Id$
     -->
 
     <!--

Modified: cocoon/whiteboard/forms/samples/swan/data/medium_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/data/medium_template.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/data/medium_template.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/data/medium_template.xml Fri Mar 18 08:36:03 2005
@@ -19,7 +19,7 @@
   xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
 
     <!--
-      CVS $Id$
+      @version $Id$
     -->
 
     <!--

Modified: cocoon/whiteboard/forms/samples/swan/data/simple_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/data/simple_template.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/data/simple_template.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/data/simple_template.xml Fri Mar 18 08:36:03 2005
@@ -19,7 +19,7 @@
   xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
 
     <!--
-      CVS $Id$
+      @version $Id$
     -->
 
     <!--

Modified: cocoon/whiteboard/forms/samples/swan/flow/swan.js
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/flow/swan.js?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/flow/swan.js (original)
+++ cocoon/whiteboard/forms/samples/swan/flow/swan.js Fri Mar 18 08:36:03 2005
@@ -18,6 +18,8 @@
 * @version $Id$
 */
 
+importPackage(org.apache.cocoon.forms.formmodel);
+
 cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
 
 function editor(form) {

Modified: cocoon/whiteboard/forms/samples/swan/forms/binding_mb.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/forms/binding_mb.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/forms/binding_mb.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/forms/binding_mb.xml Fri Mar 18 08:36:03 2005
@@ -45,7 +45,7 @@
   <fb:macro define="item-row">
     <fb:javascript id="type-selector" path="." direction="load">
       <fb:load-form>
-        widget.setValue(jxpathPointer.getNode().getFirstChild().getLocalName());
+        widget.value = jxpathPointer.getNode().getFirstChild().getLocalName();
       </fb:load-form>
     </fb:javascript>
     <fb:union id="union" path=".">

Modified: cocoon/whiteboard/forms/samples/swan/forms/model_mb.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/forms/model_mb.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/forms/model_mb.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/forms/model_mb.xml Fri Mar 18 08:36:03 2005
@@ -55,7 +55,7 @@
     <fb:javascript id="type-selector" path="." direction="load">
       <fb:load-form>
         var node = jxpathPointer.getNode().getFirstChild();
-        widget.setValue(node.getLocalName());
+        widget.value = node.getLocalName();
       </fb:load-form>
     </fb:javascript>
     <fb:union id="union" path=".">

Modified: cocoon/whiteboard/forms/samples/swan/forms/sitemap_mb.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/forms/sitemap_mb.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/forms/sitemap_mb.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/forms/sitemap_mb.xml Fri Mar 18 08:36:03 2005
@@ -45,7 +45,7 @@
   <fb:macro define="item-row">
     <fb:javascript id="type-selector" path="." direction="load">
       <fb:load-form>
-        widget.setValue(jxpathPointer.getNode().getFirstChild().getLocalName());
+        widget.value = jxpathPointer.getNode().getFirstChild().getLocalName();
       </fb:load-form>
     </fb:javascript>
     <fb:union id="union" path=".">

Modified: cocoon/whiteboard/forms/samples/swan/forms/swan_mb.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/forms/swan_mb.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/forms/swan_mb.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/forms/swan_mb.xml Fri Mar 18 08:36:03 2005
@@ -206,9 +206,7 @@
   <fb:macro define="view-selector">
     <fb:javascript id="view-selector" path="." direction="load">
       <fb:load-form>
-        widget.setValue("view");
-        // View is selected by buttons.
-        widget.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);
+        widget.value = "view";
       </fb:load-form>
     </fb:javascript>
   </fb:macro>
@@ -225,7 +223,7 @@
   <fb:macro define="item-row-class">
     <fb:javascript id="type-selector" path="." direction="load">
       <fb:load-form>
-        widget.setValue(jxpathPointer.getNode().getFirstChild().getLocalName());
+        widget.value = jxpathPointer.getNode().getFirstChild().getLocalName();
       </fb:load-form>
     </fb:javascript>
     <fb:union id="union" path=".">

Modified: cocoon/whiteboard/forms/samples/swan/forms/swan_mm.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/forms/swan_mm.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/forms/swan_mm.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/forms/swan_mm.xml Fri Mar 18 08:36:03 2005
@@ -43,13 +43,11 @@
           <fd:hint>Add after</fd:hint>
           <fd:on-action>
             <javascript>
-              var cur_row = Packages.org.apache.cocoon.forms.formmodel.Repeater.getParentRow(event.getSourceWidget());
+              var cur_row = Repeater.getParentRow(event.getSourceWidget());
               var repeater = cur_row.getParent();
               var new_row = repeater.getChild(repeater.indexOf(cur_row)+1);
               var view = new_row.getChild("view-selector");
-              view.setValue("edit");
-              // View is selected by buttons.
-              view.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);
+              view.value = "edit";
             </javascript>
           </fd:on-action>
         </fd:row-action>
@@ -63,7 +61,7 @@
 
     <fd:macro define="view-selector">
       <fd:widgets>
-        <fd:field id="view-selector">
+        <fd:field id="view-selector" state="invisible">
           <fd:label>View</fd:label>
           <fd:datatype base="string"/>
           <fd:selection-list>
@@ -78,20 +76,20 @@
               var type = widget.lookupWidget("../type-selector");
               var stuff = union.lookupWidget(union.getValue() + "/stuff");
               if("edit".equals(widget.getValue())) {
-                union.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
+                union.state = WidgetState.ACTIVE;
                 if(stuff != null) {
-                  stuff.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
+                  stuff.state = WidgetState.ACTIVE;
                 }
-                type.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
+                type.state = WidgetState.ACTIVE;
               } else if("view".equals(widget.getValue())){
-                union.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE);
+                union.state = WidgetState.ACTIVE;
                 if(stuff != null) {
-                  stuff.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);
+                  stuff.state = WidgetState.DISABLED;
                 }
-                type.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);
-              } else {
-                union.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);
-                type.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);
+                type.state = WidgetState.DISABLED;
+              } else { // "fold"
+                union.state = WidgetState.DISABLED;
+                type.state = WidgetState.DISABLED;
               }
             </javascript>
           </fd:on-value-changed>
@@ -102,7 +100,7 @@
           <fd:on-action>
             <javascript>
               var view = event.getSourceWidget().lookupWidget("../view-selector");
-              view.value="fold";
+              view.value = "fold";
             </javascript>
           </fd:on-action>
         </fd:action>
@@ -112,7 +110,7 @@
           <fd:on-action>
             <javascript>
               var view = event.getSourceWidget().lookupWidget("../view-selector");
-              view.value="view";
+              view.value = "view";
             </javascript>
           </fd:on-action>
         </fd:action>
@@ -122,7 +120,7 @@
           <fd:on-action>
             <javascript>
               var view = event.getSourceWidget().lookupWidget("../view-selector");
-              view.value="edit";
+              view.value = "edit";
             </javascript>
           </fd:on-action>
         </fd:action>
@@ -138,9 +136,7 @@
             <javascript>
               var repeater = event.getSourceWidget().lookupWidget("../items");
               var view = repeater.getRow(repeater.getSize() - 1).getChild("view-selector");
-              view.setValue("edit");
-              // View is selected by buttons.
-              view.setState(Packages.org.apache.cocoon.forms.formmodel.WidgetState.DISABLED);
+              view.value = "edit";
             </javascript>
           </fd:on-action>
         </fd:repeater-action>

Modified: cocoon/whiteboard/forms/samples/swan/forms/template_mb.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/forms/template_mb.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/forms/template_mb.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/forms/template_mb.xml Fri Mar 18 08:36:03 2005
@@ -46,7 +46,7 @@
     <fb:javascript id="type-selector" path="." direction="load">
       <fb:load-form>
         var node = jxpathPointer.getNode().getFirstChild();
-        widget.setValue(node.getLocalName());
+        widget.value = node.getLocalName();
       </fb:load-form>
     </fb:javascript>
     <fb:union id="union" path=".">

Modified: cocoon/whiteboard/forms/samples/swan/forms/xreport_mb.xml
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/forms/samples/swan/forms/xreport_mb.xml?view=diff&r1=158090&r2=158091
==============================================================================
--- cocoon/whiteboard/forms/samples/swan/forms/xreport_mb.xml (original)
+++ cocoon/whiteboard/forms/samples/swan/forms/xreport_mb.xml Fri Mar 18 08:36:03 2005
@@ -77,7 +77,7 @@
         <fb:on-bind>
           <fb:javascript id="sql-type-selector" path="." direction="load">
             <fb:load-form>
-              widget.setValue(jxpathPointer.getNode().getFirstChild().getLocalName());
+              widget.value = jxpathPointer.getNode().getFirstChild().getLocalName();
             </fb:load-form>
           </fb:javascript>
           <fb:union id="type" path=".">



Mime
View raw message