cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript ScriptableWidget.java
Date Tue, 30 Dec 2003 19:22:37 GMT
tim         2003/12/30 11:22:37

  Modified:    src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript
                        ScriptableWidget.java
  Log:
  Add flowscript support for getting and setting
  the value of Output widgets.
  
  Revision  Changes    Path
  1.4       +7 -1      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/ScriptableWidget.java
  
  Index: ScriptableWidget.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/flow/javascript/ScriptableWidget.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ScriptableWidget.java	6 Nov 2003 11:35:08 -0000	1.3
  +++ ScriptableWidget.java	30 Dec 2003 19:22:37 -0000	1.4
  @@ -53,6 +53,7 @@
   import org.apache.cocoon.woody.formmodel.BooleanField;
   import org.apache.cocoon.woody.formmodel.Field;
   import org.apache.cocoon.woody.formmodel.MultiValueField;
  +import org.apache.cocoon.woody.formmodel.Output;
   import org.apache.cocoon.woody.formmodel.Repeater;
   import org.apache.cocoon.woody.formmodel.Widget;
   import org.mozilla.javascript.Context;
  @@ -140,7 +141,8 @@
               if (sub != null) {
                   if (sub instanceof Field ||
                       sub instanceof BooleanField ||
  -                    sub instanceof AggregateField) {
  +                    sub instanceof AggregateField ||
  +                    sub instanceof Output) {
                       return sub.getValue();
                   }
                   return wrap(sub);
  @@ -240,6 +242,10 @@
                   return;
               } else if (sub instanceof BooleanField) {
                   BooleanField field = (BooleanField)sub;
  +                value = unwrap(value);
  +                field.setValue(value);
  +            } else if (sub instanceof Output) {
  +                Output field = (Output)sub;
                   value = unwrap(value);
                   field.setValue(value);
               } else if (sub instanceof Repeater) {
  
  
  

Mime
View raw message