cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r415007 - in /cocoon: branches/BRANCH_2_1_X/status.xml trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathBinding.java
Date Sat, 17 Jun 2006 08:26:49 GMT
Author: antonio
Date: Sat Jun 17 01:26:48 2006
New Revision: 415007

URL: http://svn.apache.org/viewvc?rev=415007&view=rev
Log:

<action dev="AG" type="fix" fixes-bug="COCOON-1864" due-to="Dennis Dam" due-to-emal="d.dam@hippo.nl">
  CForms Block: RepeaterJXPathBinding - order of row is inverted.
</action>

Modified:
    cocoon/branches/BRANCH_2_1_X/status.xml
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathBinding.java

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/status.xml?rev=415007&r1=415006&r2=415007&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Sat Jun 17 01:26:48 2006
@@ -182,6 +182,9 @@
   <release version="@version@" date="@date@">
 -->
   <release version="2.1.10" date="TBD">
+    <action dev="AG" type="fix" fixes-bug="COCOON-1864" due-to="Dennis Dam" due-to-emal="d.dam@hippo.nl">
+      CForms Block: RepeaterJXPathBinding - order of row is inverted.
+    </action>
     <action dev="AG" type="fix" fixes-bug="COCOON-1861" due-to="Igor Naumov" due-to-emal="igornaumov@hotmail.com">
       Naming Block: Check for Null URI in LDAPTransformer.
     </action>

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathBinding.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathBinding.java?rev=415007&r1=415006&r2=415007&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathBinding.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/binding/RepeaterJXPathBinding.java
Sat Jun 17 01:26:48 2006
@@ -121,18 +121,18 @@
         Pointer ptr = jxpc.getPointer(this.repeaterPath);
         if (ptr.getNode() != null) {
             // There are some nodes to load from
-
-            int initialSize = repeater.getSize();
+            final int initialSize = repeater.getSize();
 
             // build a jxpath iterator for pointers
             JXPathContext repeaterContext = jxpc.getRelativeContext(ptr);
             Iterator rowPointers = repeaterContext.iteratePointers(this.rowPath);
             //iterate through it
+            int currentRow = 0;
             while (rowPointers.hasNext()) {
                 // create a new row, take that as the frmModelSubContext
                 Repeater.RepeaterRow thisRow;
-                if (initialSize > 0) {
-                    thisRow = repeater.getRow(--initialSize);
+                if (currentRow < initialSize) {
+                    thisRow = repeater.getRow(currentRow++);
                 } else {
                     thisRow = repeater.addRow();
                 }



Mime
View raw message