svn commit: r808820 [2/2] - in /ofbiz/trunk: applications/accounting/webapp/accounting/agreement/ applications/accounting/webapp/accounting/fixedasset/ applications/accounting/webapp/accounting/invoice/ applications/accounting/webapp/accounting/lookup/...

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

svn commit: r808820 [2/2] - in /ofbiz/trunk: applications/accounting/webapp/accounting/agreement/ applications/accounting/webapp/accounting/fixedasset/ applications/accounting/webapp/accounting/invoice/ applications/accounting/webapp/accounting/lookup/...

lektran
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/quote/QuoteForms.xml Fri Aug 28 08:58:10 2009
@@ -79,6 +79,8 @@
               <service service-name="performFind" result-map="result" result-map-list="listIt">
                   <field-map field-name="inputFields" from-field="parameters"/>
                   <field-map field-name="entityName" value="Quote"/>
+                  <field-map field-name="viewIndex" from-field="viewIndex"/>
+                  <field-map field-name="viewSize" from-field="viewSize"/>
               </service>
           </actions>
         <auto-fields-entity entity-name="Quote" default-field-type="display"/>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementForms.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/requirement/RequirementForms.xml Fri Aug 28 08:58:10 2009
@@ -60,6 +60,8 @@
                 <field-map field-name="inputFields" from-field="requestParameters"/>
                 <field-map field-name="entityName" value="Requirement"/>
                 <field-map field-name="orderBy" value="statusId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <row-actions>

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/return/ReturnForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/return/ReturnForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/return/ReturnForms.xml (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/return/ReturnForms.xml Fri Aug 28 08:58:10 2009
@@ -156,6 +156,8 @@
                 <field-map field-name="inputFields" from-field="requestParameters"/>
                 <field-map field-name="entityName" value="ReturnHeader"/>
                 <field-map field-name="orderBy" value="entryDate DESC"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="returnId"  widget-style="buttontext" title="${uiLabelMap.OrderReturnId}">

Modified: ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/CustRequestForms.xml Fri Aug 28 08:58:10 2009
@@ -77,6 +77,8 @@
             <field-map field-name="inputFields" from-field="parameters"/>
             <field-map field-name="entityName" from-field="entityName"/>
             <field-map field-name="orderBy" value="-lastModifiedDate"/>
+            <field-map field-name="viewIndex" from-field="viewIndex"/>
+            <field-map field-name="viewSize" from-field="viewSize"/>
           </service>
         </actions>
     </form>
@@ -526,6 +528,8 @@
                 <field-map field-name="partyId" from-field="lookupPartyId"/>
                 <field-map field-name="compareDate" from-field="custRequest.custRequestDate"/>
                 <field-map field-name="lastNameFirst" value="Y"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="custRequestId"><hidden/></field>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml (original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderEntryForms.xml Fri Aug 28 08:58:10 2009
@@ -39,6 +39,8 @@
                 <!--<field-map field-name="orderByList" from-field="resultConditions.orderByList"/>-->
                 <field-map field-name="requirementConditions" from-field="resultConditions.entityConditionList"/>
                 <field-map field-name="partyId" from-field="parameters.partyId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="requirementId"><display/></field>
@@ -82,6 +84,8 @@
           <service service-name="performFind" result-map="result" result-map-list="listIt">
             <field-map field-name="inputFields" from-field="requestParameters"/>
             <field-map field-name="entityName" from-field="entityName"/>
+            <field-map field-name="viewIndex" from-field="viewIndex"/>
+            <field-map field-name="viewSize" from-field="viewSize"/>
           </service>
         </actions>
         <auto-fields-entity entity-name="Quote" default-field-type="display"/>

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Fri Aug 28 08:58:10 2009
@@ -1396,21 +1396,20 @@
             // do the lookup
             if (mainCond != null || "Y".equals(showAll)) {
                 try {
-                    // set distinct on so we only get one row per order
-                    EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
-                    // using list iterator
-                    EntityListIterator pli = delegator.findListIteratorByCondition(dynamicView, mainCond, null, fieldsToSelect, orderBy, findOpts);
-
                     // get the indexes for the partial list
                     lowIndex = viewIndex * viewSize + 1;
                     highIndex = (viewIndex + 1) * viewSize;
 
+                    // set distinct on so we only get one row per order
+                    EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_FORWARD_ONLY, EntityFindOptions.CONCUR_READ_ONLY, -1, highIndex, true);
+                    // using list iterator
+                    EntityListIterator pli = delegator.findListIteratorByCondition(dynamicView, mainCond, null, fieldsToSelect, orderBy, findOpts);
+
                     // get the partial list for this page
                     partyList = pli.getPartialList(lowIndex, viewSize);
 
                     // attempt to get the full size
-                    pli.last();
-                    partyListSize = pli.currentIndex();
+                    partyListSize = pli.getResultsSizeAfterPartialList();
                     if (highIndex > partyListSize) {
                         highIndex = partyListSize;
                     }

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy Fri Aug 28 08:58:10 2009
@@ -41,15 +41,6 @@
 try {
     beganTransaction = TransactionUtil.begin();
 
-    if (partyId) {
-        visitListIt = delegator.find("Visit", EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId), null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));
-    } else if (showAll.equalsIgnoreCase("true")) {
-        visitListIt = delegator.find("Visit", null, null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));
-    } else {
-        // show active visits
-        visitListIt = delegator.find("Visit", EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true));
-    }
-
     viewIndex = Integer.valueOf(parameters.VIEW_INDEX  ?: 1);
     viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: UtilProperties.getPropertyValue("widget", "widget.form.defaultViewSize"));
     context.viewIndex = viewIndex;
@@ -59,15 +50,22 @@
     lowIndex = (((viewIndex - 1) * viewSize) + 1);
     highIndex = viewIndex * viewSize;
 
+    if (partyId) {
+        visitListIt = delegator.find("Visit", EntityCondition.makeCondition("partyId", EntityOperator.EQUALS, partyId), null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, -1, highIndex, true));
+    } else if (showAll.equalsIgnoreCase("true")) {
+        visitListIt = delegator.find("Visit", null, null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, -1, highIndex, true));
+    } else {
+        // show active visits
+        visitListIt = delegator.find("Visit", EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), null, null, sortList, new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, -1, highIndex, true));
+    }
+
     // get the partial list for this page
     visitList = visitListIt.getPartialList(lowIndex, viewSize);
     if (!visitList) {
         visitList = new ArrayList();
     }
 
-    // attempt to get the full size
-    visitListIt.last();
-    visitListSize = visitListIt.currentIndex();
+    visitListSize = visitListIt.getResultSizeAfterPartialList();
     if (highIndex > visitListSize) {
         highIndex = visitListSize;
     }

Modified: ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/lookup/LookupForms.xml Fri Aug 28 08:58:10 2009
@@ -153,6 +153,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="orderBy" value="lastName"/>
                 <field-map field-name="entityName" value="PartyRelationshipAndDetail"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="partyId" title="${uiLabelMap.PartyPartyId}"  widget-style="smallSubmit">
@@ -183,6 +185,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" from-field="entityName"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <!--<auto-fields-entity entity-name="Person" default-field-type="display"/>-->
@@ -273,6 +277,8 @@
           <service service-name="performFind" result-map="result" result-map-list="listIt">
             <field-map field-name="inputFields" from-field="parameters"/>
             <field-map field-name="entityName" from-field="entityName"/>
+            <field-map field-name="viewIndex" from-field="viewIndex"/>
+            <field-map field-name="viewSize" from-field="viewSize"/>
           </service>
         </actions>
         <!--<auto-fields-entity entity-name="PartyGroup" default-field-type="display"/>-->
@@ -305,6 +311,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="PartyClassificationGroup"/>
                 <field-map field-name="orderBy" value="description"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
 
@@ -364,6 +372,8 @@
             <service service-name="performFind" result-map-list="listIt" result-map="result">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="CommunicationEvent"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="communicationEventId" title="${uiLabelMap.MarketingContactListCommEventId}" widget-style="smallSubmit">

Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationEventForms.xml Fri Aug 28 08:58:10 2009
@@ -429,6 +429,8 @@
                 <field-map field-name="inputFields" from-field="searchParameters"/>
                 <field-map field-name="entityName" value="CommunicationEventAndRole"/>
                 <field-map field-name="orderBy" from-field="parameters.sortField"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <row-actions>
@@ -526,6 +528,8 @@
                 <field-map from-field="parameters" field-name="inputFields"/>
                 <field-map from-field="entityName" field-name="entityName"/>
                 <field-map value="-createdStamp" field-name="orderBy"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="removeLink" title="${uiLabelMap.CommonDelete}"><submit/></field>

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyInvitationForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyInvitationForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyInvitationForms.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyInvitationForms.xml Fri Aug 28 08:58:10 2009
@@ -47,6 +47,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="PartyInvitation"/>
                 <field-map field-name="orderBy" value="partyInvitationId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="partyInvitationId" title="${uiLabelMap.PartyInvitationPartyInvitationId}" widget-style="buttontext">

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java Fri Aug 28 08:58:10 2009
@@ -286,6 +286,7 @@
 
                     // set distinct on
                     EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
+                    findOpts.setMaxRows(highIndex);
                     // using list iterator
                     EntityListIterator pli = delegator.find(entityName, mainCond, null, null, orderByFields, findOpts);
 
@@ -311,9 +312,7 @@
                         } else {
                             productCategoryMembers = pli.getPartialList(lowIndex, viewSize);
 
-                            // attempt to get the full size
-                            pli.last();
-                            listSize = pli.currentIndex();
+                            listSize = pli.getResultsSizeAfterPartialList();
                         }
                     } else {
                         productCategoryMembers = pli.getCompleteList();

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Fri Aug 28 08:58:10 2009
@@ -639,6 +639,9 @@
             EntityFindOptions efo = new EntityFindOptions();
             efo.setDistinct(true);
             efo.setResultSetType(EntityFindOptions.TYPE_SCROLL_INSENSITIVE);
+            if (maxResults != null) {
+                efo.setMaxRows(maxResults);
+            }
 
             EntityListIterator eli = null;
             try {
@@ -739,12 +742,7 @@
                 }
 
                 if (searchResult != null) {
-                    // we weren't at the end, so go to the end and get the index
-                    //Debug.logInfo("Getting totalResults from ending index - before last() currentIndex=" + eli.currentIndex(), module);
-                    if (eli.last()) {
-                        this.totalResults = Integer.valueOf(eli.currentIndex());
-                        //Debug.logInfo("Getting totalResults from ending index - after last() currentIndex=" + eli.currentIndex(), module);
-                    }
+                    this.totalResults = eli.getResultsSizeAfterPartialList();
                 }
                 if (this.totalResults == null || this.totalResults.intValue() == 0) {
                     int total = numRetreived;

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java Fri Aug 28 08:58:10 2009
@@ -878,6 +878,7 @@
                 addOnTopProdCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, now));
                 addOnTopProdCondList.add(EntityCondition.makeCondition("productCategoryId", EntityOperator.EQUALS, addOnTopProdCategoryId));
                 EntityFindOptions findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
+                findOpts.setMaxRows(highIndex);
                 EntityListIterator pli = null;
                 try {
                     pli = delegator.find("ProductCategoryMember", EntityCondition.makeCondition(addOnTopProdCondList, EntityOperator.AND), null, UtilMisc.toSet("productId", "sequenceNum"), UtilMisc.toList("sequenceNum"), findOpts);
@@ -886,9 +887,7 @@
                     for (GenericValue alwaysAddProductCategoryMember: addOnTopProductCategoryMembers) {
                         productIds.add(alwaysAddProductCategoryMember.getString("productId"));
                     }
-                    // attempt to get the full size
-                    pli.last();
-                    addOnTopTotalListSize = pli.currentIndex();
+                    addOnTopTotalListSize = pli.getResultsSizeAfterPartialList();
                     listSize = listSize + addOnTopTotalListSize;
                 } catch (GenericEntityException e) {
                     Debug.logError(e, module);

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy Fri Aug 28 08:58:10 2009
@@ -70,6 +70,7 @@
 EntityFindOptions efo = new EntityFindOptions();
 efo.setDistinct(true);
 efo.setResultSetType(EntityFindOptions.TYPE_SCROLL_INSENSITIVE);
+efo.setMaxRows(highIndex);
 
 boolean beganTransaction = false;
 try {

Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy Fri Aug 28 08:58:10 2009
@@ -68,6 +68,7 @@
 EntityFindOptions efo = new EntityFindOptions();
 efo.setDistinct(true);
 efo.setResultSetType(EntityFindOptions.TYPE_SCROLL_INSENSITIVE);
+efo.setMaxRows(highIndex);
 
 boolean beganTransaction = false;
 try {

Modified: ofbiz/trunk/applications/product/webapp/catalog/config/ConfigForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/config/ConfigForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/config/ConfigForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/config/ConfigForms.xml Fri Aug 28 08:58:10 2009
@@ -27,6 +27,8 @@
             <service service-name="performFind" result-map-list="listIt" result-map="performFindResult">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProductConfigItem"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <row-actions>

Modified: ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/feature/FeatureForms.xml Fri Aug 28 08:58:10 2009
@@ -122,6 +122,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProductFeatureType"/>
                 <field-map field-name="orderBy" value="productFeatureTypeId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="productFeatureTypeId" widget-style="buttontext">
@@ -173,6 +175,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProductFeatureIactn"/>
                 <field-map field-name="orderBy" value="productFeatureId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
                 </service>
             </actions>
 
@@ -301,6 +305,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProductFeatureCategory"/>
                 <field-map field-name="orderBy" value="productFeatureCategoryId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="productFeatureCategoryId" title="${uiLabelMap.CommonId}" widget-style="buttontext">

Modified: ofbiz/trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml Fri Aug 28 08:58:10 2009
@@ -50,6 +50,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Product"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="productId" title="${uiLabelMap.ProductProductId}" widget-style="buttontext">
@@ -86,6 +88,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="SupplierProductAndProduct"/>
                 <field-map field-name="orderBy" value="productId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="productId" title="${uiLabelMap.ProductProductId}" widget-style="buttontext">
@@ -108,6 +112,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Product"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="productId" title="${uiLabelMap.ProductProductId}" widget-style="buttontext">
@@ -171,6 +177,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProductAndPriceView"/>
                 <field-map field-name="orderBy" value="productId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <!--
@@ -238,6 +246,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProductCategory"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <auto-fields-entity entity-name="ProductCategory" default-field-type="display"/>
@@ -279,6 +289,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProductFeature"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <auto-fields-entity entity-name="ProductFeature" default-field-type="display"/>
@@ -305,6 +317,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProductStore"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
 

Modified: ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/price/PriceForms.xml Fri Aug 28 08:58:10 2009
@@ -29,6 +29,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProductPriceRule"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="productPriceRuleId" title="${uiLabelMap.ProductPriceRuleNameId}" widget-style="buttontext">

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/CountFacilityInventoryByProduct.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/CountFacilityInventoryByProduct.groovy?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/CountFacilityInventoryByProduct.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/CountFacilityInventoryByProduct.groovy Fri Aug 28 08:58:10 2009
@@ -222,11 +222,12 @@
     List prods = null;
     try {
         beganTransaction = TransactionUtil.begin();
-        prodsEli = delegator.findListIteratorByCondition(prodView, whereCondition, null, null, orderBy, findOpts);
 
         // get the indexes for the partial list
         lowIndex = ((viewIndex.intValue() * viewSize.intValue()) + 1);
         highIndex = (viewIndex.intValue() + 1) * viewSize.intValue();
+        findOpts.setMaxRows(highIndex);
+        prodsEli = delegator.findListIteratorByCondition(prodView, whereCondition, null, null, orderBy, findOpts);
 
         // get the partial list for this page
         prods = prodsEli.getPartialList(lowIndex, highIndex);
@@ -333,8 +334,7 @@
                 }
                 productListSize = lowIndex + rows.size() + rowProcessed - 1;
             } else {
-                prodsEli.last();
-                productListSize = prodsEli.currentIndex();
+                productListSize = prodsEli.getResultSizeAfterPartialList();
             }
         }
         prodsEli.close();

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy Fri Aug 28 08:58:10 2009
@@ -58,17 +58,16 @@
 List inventoryItems = null;
 if (andCondition.size() > 1) {
     try {
-        findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
-        beganTransaction = TransactionUtil.begin();
-        inventoryItemsEli = delegator.findListIteratorByCondition(inventoryItemAndLabelsView, EntityCondition.makeCondition(andCondition, EntityOperator.AND), null, null, null, findOpts);
-
         // get the indexes for the partial list
         lowIndex = ((viewIndex * viewSize) + 1);
         highIndex = (viewIndex - 1) * viewSize;
 
-        // attempt to get the full size
-        inventoryItemsEli.last();
-        inventoryItemsSize = inventoryItemsEli.currentIndex();
+        findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
+        findOpts.setMaxRows(highIndex);
+        beganTransaction = TransactionUtil.begin();
+        inventoryItemsEli = delegator.findListIteratorByCondition(inventoryItemAndLabelsView, EntityCondition.makeCondition(andCondition, EntityOperator.AND), null, null, null, findOpts);
+
+        inventoryItemsSize = inventoryItemsEli.getResultSizeAfterPartialList();
         context.inventoryItemsSize = inventoryItemsSize;
         if (highIndex > inventoryItemsSize) {
             highIndex = inventoryItemsSize;

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy Fri Aug 28 08:58:10 2009
@@ -103,22 +103,19 @@
         try {
             beganTransaction = TransactionUtil.begin();
 
-            // using list iterator
-            orli = delegator.find("Shipment", mainCond, null, null, orderBy, findOpts);
-
             // get the indexes for the partial list
             lowIndex = (((viewIndex - 1) * viewSize) + 1);
             highIndex = viewIndex * viewSize;
+            findOpts.setMaxRows(highIndex);
+            // using list iterator
+            orli = delegator.find("Shipment", mainCond, null, null, orderBy, findOpts);
 
-            // attempt to get the full size
-            orli.last();
-            shipmentListSize = orli.currentIndex();
+            shipmentListSize = orli.getResultSizeAfterPartialList();
             if (highIndex > shipmentListSize) {
                 highIndex = shipmentListSize;
             }
 
             // get the partial list for this page
-            orli.beforeFirst();
             if (shipmentListSize > 0) {
                 shipmentList = orli.getPartialList(lowIndex, viewSize);
             } else {

Modified: ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/facility/FacilityForms.xml Fri Aug 28 08:58:10 2009
@@ -26,6 +26,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Facility"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="facilityId">
@@ -99,6 +101,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="InventoryItemAndLocation"/>
                 <field-map field-name="orderBy" value="statusId|quantityOnHandTotal|serialNumber"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="inventoryItemId" widget-style="buttontext">
@@ -219,6 +223,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="InventoryItemAndDetail"/>
                 <field-map field-name="orderBy" value="productId|inventoryItemId|-inventoryItemDetailSeqId|-effectiveDate|quantityOnHandTotal"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <row-actions>
@@ -281,6 +287,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="InventoryItemAndDetail"/>
                 <field-map field-name="orderBy" value="productId|-effectiveDate|inventoryItemId|-inventoryItemDetailSeqId|quantityOnHandTotal"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <row-actions>
@@ -335,6 +343,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="InventoryItemAndDetail"/>
                 <field-map field-name="orderBy" value="-effectiveDate|productId|inventoryItemId|-inventoryItemDetailSeqId|quantityOnHandTotal"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
 

Modified: ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/lookup/FieldLookupForms.xml Fri Aug 28 08:58:10 2009
@@ -43,6 +43,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Facility"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="facilityId" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
@@ -79,6 +81,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="FacilityLocation"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <auto-fields-entity entity-name="FacilityLocation" default-field-type="display"/>
@@ -119,6 +123,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Shipment"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="shipmentId" widget-style="buttontext">

Modified: ofbiz/trunk/applications/product/widget/catalog/SubscriptionForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/SubscriptionForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/SubscriptionForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/SubscriptionForms.xml Fri Aug 28 08:58:10 2009
@@ -94,6 +94,8 @@
             <service service-name="performFind" result-map-list="listIt" result-map="performFindResult">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Subscription"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <auto-fields-entity entity-name="Subscription" default-field-type="display"/>

Modified: ofbiz/trunk/applications/product/widget/facility/ShipmentGatewayConfigForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/ShipmentGatewayConfigForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/ShipmentGatewayConfigForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/ShipmentGatewayConfigForms.xml Fri Aug 28 08:58:10 2009
@@ -43,6 +43,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ShipmentGatewayConfig"/>
                 <field-map field-name="orderBy" value="description"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <auto-fields-entity entity-name="ShipmentGatewayConfig" default-field-type="display"/>
@@ -304,6 +306,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ShipmentGatewayConfigType"/>
                 <field-map field-name="orderBy" value="description DESC"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <auto-fields-entity entity-name="ShipmentGatewayConfigType" default-field-type="display"/>

Modified: ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java (original)
+++ ofbiz/trunk/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java Fri Aug 28 08:58:10 2009
@@ -313,6 +313,9 @@
             EntityFindOptions efo = new EntityFindOptions();
             efo.setDistinct(true);
             efo.setResultSetType(EntityFindOptions.TYPE_SCROLL_INSENSITIVE);
+            if (maxResults != null) {
+                efo.setMaxRows(maxResults);
+            }
 
             EntityListIterator eli = null;
             try {
@@ -415,12 +418,7 @@
                 }
 
                 if (searchResult != null) {
-                    // we weren't at the end, so go to the end and get the index
-                    //Debug.logInfo("Getting totalResults from ending index - before last() currentIndex=" + eli.currentIndex(), module);
-                    if (eli.last()) {
-                        this.totalResults = Integer.valueOf(eli.currentIndex());
-                        //Debug.logInfo("Getting totalResults from ending index - after last() currentIndex=" + eli.currentIndex(), module);
-                    }
+                    this.totalResults = eli.getResultsSizeAfterPartialList();
                 }
                 if (this.totalResults == null || this.totalResults.intValue() == 0) {
                     int total = numRetreived;

Modified: ofbiz/trunk/applications/workeffort/widget/LookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/LookupForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/LookupForms.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/LookupForms.xml Fri Aug 28 08:58:10 2009
@@ -139,6 +139,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="WorkEffort"/>
                 <field-map field-name="orderBy" value="workEffortId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="workEffortId" title="${uiLabelMap.WorkEffortWorkEffortId}" widget-style="buttontext">
@@ -168,6 +170,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Timesheet"/>
                 <field-map field-name="orderBy" value="timesheetId"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="timesheetId" title="${uiLabelMap.WorkEffortTimesheetTimesheetId}" widget-style="buttontext">

Modified: ofbiz/trunk/applications/workeffort/widget/TimesheetForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/TimesheetForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/TimesheetForms.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/TimesheetForms.xml Fri Aug 28 08:58:10 2009
@@ -80,6 +80,8 @@
             <service result-map-list="listIt" result-map="result" service-name="performFind">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Timesheet"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <auto-fields-entity entity-name="Timesheet"/>

Modified: ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml (original)
+++ ofbiz/trunk/applications/workeffort/widget/WorkEffortForms.xml Fri Aug 28 08:58:10 2009
@@ -272,6 +272,8 @@
             <service result-map-list="listIt" result-map="result" service-name="performFind">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="WorkEffort"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="workEffortId" title="${uiLabelMap.WorkEffortWorkEffortId}" widget-style="buttontext">
@@ -401,6 +403,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="WorkEffortFindView"/>
                 <field-map field-name="orderBy" value="lastModifiedDate DESC"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
             <service service-name="removeDuplicateWorkEfforts" result-map="result" result-map-list="workEfforts">
                 <field-map field-name="workEffortIterator" from-field="listIt"/>
@@ -509,6 +513,8 @@
             <service result-map-list="listIt" result-map="result" service-name="performFind">
                 <field-map from-field="parameters" field-name="inputFields"/>
                 <field-map from-field="entityName" field-name="entityName"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="workEffortId"><display/></field>
@@ -645,6 +651,8 @@
             <service result-map-list="listIt" result-map="result" service-name="performFind">
                 <field-map from-field="requestParameters" field-name="inputFields"/>
                 <field-map from-field="entityName" field-name="entityName"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="communicationEventId">
@@ -727,6 +735,8 @@
             <service result-map-list="listIt" result-map="result" service-name="performFind">
                 <field-map from-field="parameters" field-name="inputFields"/>
                 <field-map from-field="entityName" field-name="entityName"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="communicationEventId" title="${uiLabelMap.WorkEffortCommEventId}" widget-style="buttontext">

Modified: ofbiz/trunk/framework/common/widget/LookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/LookupForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/LookupForms.xml (original)
+++ ofbiz/trunk/framework/common/widget/LookupForms.xml Fri Aug 28 08:58:10 2009
@@ -43,6 +43,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Geo"/>
                 <field-map field-name="orderBy" value="geoName"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="geoId"  widget-style="buttontext" title="${uiLabelMap.CommonSegmentGroupGeoId}">

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/ListFinder.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/ListFinder.java?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/ListFinder.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/finder/ListFinder.java Fri Aug 28 08:58:10 2009
@@ -193,6 +193,17 @@
                 EntityFindOptions options = new EntityFindOptions();
                 options.setDistinct(distinct);
                 options.setResultSetType(resultSetType);
+                if (outputHandler instanceof LimitRange) {
+                    LimitRange limitRange = (LimitRange) outputHandler;
+                    int start = limitRange.getStart(context);
+                    int size = limitRange.getSize(context);
+                    options.setMaxRows(start + size);
+                } else if (outputHandler instanceof LimitView) {
+                    LimitView limitView = (LimitView) outputHandler;
+                    int index = limitView.getIndex(context);
+                    int size = limitView.getSize(context);
+                    options.setMaxRows(size * (index + 1));
+                }
                 boolean beganTransaction = false;
                 try {
                     if (useTransaction) {

Modified: ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml Fri Aug 28 08:58:10 2009
@@ -35,6 +35,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="exampleFeatureCtx"/>
                 <field-map field-name="entityName" value="ExampleFeature"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="exampleFeatureId" title="${uiLabelMap.ExampleExampleFeatureId}" widget-style="buttontext">
@@ -147,6 +149,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="orderBy" value="description"/>
                 <field-map field-name="entityName" value="ExampleFeature"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <!--<auto-fields-entity entity-name="ExampleFeature" default-field-type="display"/>-->

Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/ExampleForms.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Fri Aug 28 08:58:10 2009
@@ -47,6 +47,8 @@
                 <field-map field-name="inputFields" from-field="exampleCtx"/>
                 <field-map field-name="entityName" value="Example"/>
                 <field-map field-name="orderBy" from-field="parameters.sortField"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <alt-row-style use-when="&quot;EXST_APPROVED&quot;.equals(statusId)" style="Validate"/>

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/actions/entity/FindGeneric.groovy Fri Aug 28 08:58:10 2009
@@ -156,7 +156,8 @@
             beganTransaction = TransactionUtil.begin();
 
             EntityFindOptions efo = new EntityFindOptions();
-            efo.setResultSetType(EntityFindOptions.TYPE_SCROLL_INSENSITIVE);
+            efo.setMaxRows(highIndex);
+            efo.setResultSetType(EntityFindOptions.TYPE_FORWARD_ONLY);
             EntityListIterator resultEli = null;
             fieldsToSelect = null;
 
@@ -175,10 +176,7 @@
             resultEli = delegator.find(entityName, condition, null, fieldsToSelect, null, efo);
             resultPartialList = resultEli.getPartialList(lowIndex, highIndex - lowIndex + 1);
 
-            // DEJ 20080701 avoid using redundant query, will use eli.getResultsSizeAfterPartialList() below instead: arraySize = (int) delegator.findCountByCondition(entityName, condition, null, null);
-            // SG 20090826 switched back to findCountByCondition, resultSet.last() appears to take O(n) time whereas findCountByCondition is almost constant regardless of the result size
-            //arraySize = resultEli.getResultsSizeAfterPartialList();
-            arraySize = delegator.findCountByCondition(entityName, condition, null);
+            arraySize = resultEli.getResultsSizeAfterPartialList();
             if (arraySize < highIndex) {
                 highIndex = arraySize;
             }

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/service/ServiceForms.xml Fri Aug 28 08:58:10 2009
@@ -77,6 +77,8 @@
                 <field-map field-name="inputFields" from-field="jobCtx"/>
                 <field-map field-name="entityName" value="JobSandbox"/>
                 <field-map field-name="orderBy" from-field="parameters.sortField"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="jobName" title="${uiLabelMap.WebtoolsJob}" sort-field="true"><display/></field>

Modified: ofbiz/trunk/framework/webtools/webapp/webtools/tempexpr/tempExprForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/webapp/webtools/tempexpr/tempExprForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/framework/webtools/webapp/webtools/tempexpr/tempExprForms.xml (original)
+++ ofbiz/trunk/framework/webtools/webapp/webtools/tempexpr/tempExprForms.xml Fri Aug 28 08:58:10 2009
@@ -57,6 +57,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="TemporalExpression"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
     </form>

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/forms/FixedAssetForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/forms/FixedAssetForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/forms/FixedAssetForms.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/forms/FixedAssetForms.xml Fri Aug 28 08:58:10 2009
@@ -71,6 +71,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="FixedAssetMaintWorkEffort"/>
                 <field-map field-name="orderBy" value="-actualStartDate"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="maintHistSeqId" widget-style="linktext">

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/forms/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/forms/ProductForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/forms/ProductForms.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/forms/ProductForms.xml Fri Aug 28 08:58:10 2009
@@ -63,6 +63,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Product"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="productId" title="${uiLabelMap.CommonId}" widget-style="buttontext">
@@ -95,6 +97,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Product"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="productId" title="${uiLabelMap.CommonId}" widget-style="buttontext">

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/ismgr/FieldLookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/ismgr/FieldLookupForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/ismgr/FieldLookupForms.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/ismgr/FieldLookupForms.xml Fri Aug 28 08:58:10 2009
@@ -45,6 +45,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="FixedAsset"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="fixedAssetId" title="${uiLabelMap.AccountingFixedAssetId}" widget-style="buttontext">
@@ -78,6 +80,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="FixedAsset"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="fixedAssetId" title="${uiLabelMap.AccountingFixedAssetId}" widget-style="buttontext">

Modified: ofbiz/trunk/specialpurpose/assetmaint/widget/ismgr/FixedAssetForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/assetmaint/widget/ismgr/FixedAssetForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/assetmaint/widget/ismgr/FixedAssetForms.xml (original)
+++ ofbiz/trunk/specialpurpose/assetmaint/widget/ismgr/FixedAssetForms.xml Fri Aug 28 08:58:10 2009
@@ -114,6 +114,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="FixedAsset"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="fixedAssetId" widget-style="linktext">
@@ -144,6 +146,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="FixedAsset"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <field name="fixedAssetId" widget-style="linktext">

Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/blog/BlogForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/blog/BlogForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/blog/BlogForms.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/blog/BlogForms.xml Fri Aug 28 08:58:10 2009
@@ -63,6 +63,8 @@
             <service service-name="performFind" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="requestParameters"/>
                 <field-map field-name="entityName" from-field="entityName"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
 

Modified: ofbiz/trunk/specialpurpose/oagis/widget/forms/MessageInfoForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/widget/forms/MessageInfoForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/widget/forms/MessageInfoForms.xml (original)
+++ ofbiz/trunk/specialpurpose/oagis/widget/forms/MessageInfoForms.xml Fri Aug 28 08:58:10 2009
@@ -27,6 +27,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="requestParameters"/>
                 <field-map field-name="entityName" from-field="entityName"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <auto-fields-entity entity-name="OagisMessageInfo" default-field-type="display"/>
@@ -65,6 +67,8 @@
             <service service-name="performFind" result-map="result" result-map-list="listIt">
                 <field-map field-name="inputFields" from-field="requestParameters"/>
                 <field-map field-name="entityName" from-field="entityName"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <auto-fields-entity entity-name="OagisMessageErrorInfo" default-field-type="display"/>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/CustRequestForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/CustRequestForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/CustRequestForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/CustRequestForms.xml Fri Aug 28 08:58:10 2009
@@ -144,6 +144,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="WorkEffortCustRequestView"/>
                 <field-map field-name="orderBy" from-field="parameters.sortField"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <row-actions>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Fri Aug 28 08:58:10 2009
@@ -150,6 +150,8 @@
                 <field-map field-name="entityName" value="WorkEffortAndPartyAssign"/>
                 <field-map field-name="distinct" value="Y"/>
                 <field-map field-name="orderBy" value="-lastStatusUpdate"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>          
             </service>
         </actions>
         <row-actions>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Fri Aug 28 08:58:10 2009
@@ -179,6 +179,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="ProjectAndPhaseAndTaskParty"/>
                 <field-map field-name="orderBy" from-field="parameters.sortField"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
         <row-actions>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml?rev=808820&r1=808819&r2=808820&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Fri Aug 28 08:58:10 2009
@@ -122,6 +122,8 @@
                 <field-map field-name="inputFields" from-field="parameters"/>
                 <field-map field-name="entityName" value="Timesheet"/>
                 <field-map field-name="orderBy" value="fromDate DESC"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
             <set field="complete" value="${uiLabelMap.ProjectMgrToComplete}"/>
         </actions>