svn commit: r1798599 - /ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1798599 - /ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java

jleroux@apache.org
Author: jleroux
Date: Tue Jun 13 13:28:04 2017
New Revision: 1798599

URL: http://svn.apache.org/viewvc?rev=1798599&view=rev
Log:
No functional change

Just comments about EntityListIterator usage in Paginator class.

Modified:
    ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java?rev=1798599&r1=1798598&r2=1798599&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/Paginator.java Tue Jun 13 13:28:04 2017
@@ -52,6 +52,7 @@ public final class Paginator {
         return value != null ? value.intValue() : 0;
     }
 
+    // entryList might be an  EntityListIterator. It will then be closed at the end of FormRenderer.renderItemRows()
     public static void getListLimits(ModelForm modelForm, Map<String, Object> context, Object entryList) {
         int viewIndex = 0;
         int viewSize = 0;
@@ -233,6 +234,8 @@ public final class Paginator {
         context.put("actualPageSize", Integer.valueOf(highIndex - lowIndex));
 
         if (iter instanceof EntityListIterator) {
+            // The EntityListIterator will be closed at the end of FormRenderer.renderItemRows()
+            // Note: it's also used in MacroScreenRenderer.renderScreenletPaginateMenu() but I could not find where it's then closed, nor issues...
             try {
                 ((EntityListIterator) iter).beforeFirst();
             } catch (GenericEntityException e) {