cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v2 ScriptableWidget.java
Date Sat, 24 Apr 2004 10:42:18 GMT
bruno       2004/04/24 03:42:18

  Modified:    src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v2
                        ScriptableWidget.java
  Log:
  fixing some things after ContainerWidget refactoring
  
  Revision  Changes    Path
  1.8       +6 -4      cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v2/ScriptableWidget.java
  
  Index: ScriptableWidget.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v2/ScriptableWidget.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ScriptableWidget.java	23 Apr 2004 13:02:31 -0000	1.7
  +++ ScriptableWidget.java	24 Apr 2004 10:42:18 -0000	1.8
  @@ -128,7 +128,7 @@
   
       public boolean has(String id, Scriptable start) {
           if (delegate != null) {
  -            if (!(delegate instanceof Repeater)) {
  +            if (delegate instanceof ContainerWidget) {
                   Widget sub = ((ContainerWidget)delegate).getWidget(id);
                   if (sub != null) {
                       return true;
  @@ -158,7 +158,7 @@
           if (result != NOT_FOUND) {
               return result;
           }
  -        if (delegate != null && !(delegate instanceof Repeater)) {
  +        if (delegate != null && delegate instanceof ContainerWidget) {
               Widget sub = ((ContainerWidget)delegate).getWidget(id);
               if (sub != null) {
                   return wrap(sub);
  @@ -499,7 +499,9 @@
       }
   
       public ScriptableWidget jsFunction_getWidget(String id) {
  -        Widget sub = ((ContainerWidget)delegate).getWidget(id);
  +        Widget sub = null;
  +        if (delegate instanceof ContainerWidget)
  +            sub = ((ContainerWidget)delegate).getWidget(id);
           return wrap(sub);
       }
   
  
  
  

Mime
View raw message