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/woody/java/org/apache/cocoon/woody/binding RepeaterJXPathBinding.java
Date Wed, 29 Oct 2003 09:36:04 GMT
bruno       2003/10/29 01:36:04

  Modified:    src/blocks/woody/java/org/apache/cocoon/woody/binding
                        RepeaterJXPathBinding.java
  Log:
  Fixed problem with wrong rows being deleted, causing by changing pointers,
  solved by cloning the pointers.
  
  Revision  Changes    Path
  1.8       +4 -4      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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RepeaterJXPathBinding.java	18 Sep 2003 20:16:13 -0000	1.7
  +++ RepeaterJXPathBinding.java	29 Oct 2003 09:36:04 -0000	1.8
  @@ -191,7 +191,7 @@
                           } else {
                               getLogger().warn("Convertor ignored on backend-value which
isn't of type String.");
                           }                            
  -                    }                        
  +                    }
   
                       if (rowIdValue.equals(matchId)) {
                           // match! --> bind to children
  @@ -212,7 +212,7 @@
           List rowsToDelete = new ArrayList();
           while (rowPointers.hasNext()) {
               Pointer jxp = (Pointer) rowPointers.next();
  -            JXPathContext rowContext = repeaterContext.getRelativeContext(jxp);
  +            JXPathContext rowContext = repeaterContext.getRelativeContext((Pointer)jxp.clone());
   
               Object matchId = rowContext.getValue(this.uniqueRowIdPath);
               if (matchId != null && this.uniqueRowIdConvertor != null) {
  @@ -221,8 +221,8 @@
                   } else {
                       getLogger().warn("Convertor ignored on backend-value which isn't of
type String.");
                   }                            
  -            }  
  -            
  +            }
  +
               // check if matchPath was in list of updates, if not --> bind for delete
               if (!updatedRowIds.contains(matchId)) {
                   rowsToDelete.add(rowContext);
  
  
  

Mime
View raw message