cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding RepeaterJXPathBinding.java
Date Tue, 26 Aug 2003 13:55:46 GMT
mpo         2003/08/26 06:55:46

  Modified:    src/blocks/woody/java/org/apache/cocoon/woody/formmodel
                        Repeater.java
               src/blocks/woody/java/org/apache/cocoon/woody/binding
                        RepeaterJXPathBinding.java
  Log:
  Making sure that repeater-rows are removed during load().
  Added convenience method to Repeater widget for this.
  
  Revision  Changes    Path
  1.8       +7 -0      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Repeater.java
  
  Index: Repeater.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Repeater.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Repeater.java	12 Aug 2003 12:55:43 -0000	1.7
  +++ Repeater.java	26 Aug 2003 13:55:46 -0000	1.8
  @@ -103,6 +103,13 @@
       }
   
       /**
  +     * Clears all rows from the repeater.
  +     */
  +    public void removeRows() {
  +        rows.clear();
  +    }
  +
  +    /**
        * Gets a widget on a certain row.
        * @param rowIndex startin from 0
        * @param id a widget id
  
  
  
  1.5       +1 -0      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding/RepeaterJXPathBinding.java
  
  Index: RepeaterJXPathBinding.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/binding/RepeaterJXPathBinding.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RepeaterJXPathBinding.java	26 Aug 2003 13:10:12 -0000	1.4
  +++ RepeaterJXPathBinding.java	26 Aug 2003 13:55:46 -0000	1.5
  @@ -106,6 +106,7 @@
       public void loadFormFromModel(Widget frmModel, JXPathContext jxpc) {
           // Find the repeater
           Repeater repeater = (Repeater) frmModel.getWidget(this.repeaterId);
  +        repeater.removeRows();
   
           // build a jxpath iterator for pointers
           JXPathContext repeaterContext = jxpc.getRelativeContext(jxpc.getPointer(this.repeaterPath));
  
  
  

Mime
View raw message