Modified: ofbiz/branches/executioncontext20090812/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/party/src/org/ofbiz/party/party/PartyServices.java (original) +++ ofbiz/branches/executioncontext20090812/applications/party/src/org/ofbiz/party/party/PartyServices.java Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy (original) +++ ofbiz/branches/executioncontext20090812/applications/party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/party/webapp/partymgr/lookup/LookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/party/webapp/partymgr/lookup/LookupForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/party/webapp/partymgr/lookup/LookupForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/party/webapp/partymgr/lookup/LookupForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/party/webapp/partymgr/party/profileblocks/Notes.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/party/webapp/partymgr/party/profileblocks/Notes.ftl?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/party/webapp/partymgr/party/profileblocks/Notes.ftl (original) +++ ofbiz/branches/executioncontext20090812/applications/party/webapp/partymgr/party/profileblocks/Notes.ftl Tue Sep 1 21:33:41 2009 @@ -33,7 +33,7 @@ <#list notes as noteRef> <tr> <td> - <div><b>${uiLabelMap.FormFieldTitle_noteName}: </b>${noteRef.noteName}</div> + <div><b>${uiLabelMap.FormFieldTitle_noteName}: </b>${noteRef.noteName?if_exists}</div> <div><b>${uiLabelMap.CommonBy}: </b>${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator, noteRef.noteParty, true)}</div> <div><b>${uiLabelMap.CommonAt}: </b>${noteRef.noteDateTime.toString()}</div> </td> Modified: ofbiz/branches/executioncontext20090812/applications/party/widget/partymgr/CommunicationEventForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/party/widget/partymgr/CommunicationEventForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/party/widget/partymgr/CommunicationEventForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/party/widget/partymgr/CommunicationEventForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/party/widget/partymgr/PartyInvitationForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/party/widget/partymgr/PartyInvitationForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/party/widget/partymgr/PartyInvitationForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/party/widget/partymgr/PartyInvitationForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/config/ProductUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/config/ProductUiLabels.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/config/ProductUiLabels.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/config/ProductUiLabels.xml Tue Sep 1 21:33:41 2009 @@ -9673,7 +9673,7 @@ <value xml:lang="th">ลà¸à¸à¸µà¸¢à¹à¹à¸§à¸´à¸£à¹à¸à¸à¸±à¹à¸à¸«à¸¡à¸</value> <value xml:lang="zh">å é¤å ¨é¨å ³é®å</value> </property> - <property key="ProductDept"> + <property key="ProductDepth"> <value xml:lang="de">Tiefe</value> <value xml:lang="en">Depth</value> <value xml:lang="es">Profundidad</value> Modified: ofbiz/branches/executioncontext20090812/applications/product/data/ProductTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/data/ProductTypeData.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/data/ProductTypeData.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/data/ProductTypeData.xml Tue Sep 1 21:33:41 2009 @@ -192,6 +192,7 @@ <ProductCategoryType description="Mix and Match" hasTable="N" parentTypeId="" productCategoryTypeId="MIXMATCH_CATEGORY"/> <ProductCategoryType description="Cross Sell" hasTable="N" parentTypeId="" productCategoryTypeId="CROSS_SELL_CATEGORY"/> <ProductCategoryType description="Tax" hasTable="N" parentTypeId="" productCategoryTypeId="TAX_CATEGORY"/> + <ProductCategoryType description="Google Base" hasTable="N" parentTypeId="" productCategoryTypeId="GOOGLE_BASE_CATEGORY"/> <!-- product geo data --> <EnumerationType description="Product Geo Data" enumTypeId="PROD_GEO" hasTable="N" parentTypeId=""/> Modified: ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/category/CategoryServices.java URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original) +++ ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/category/CategoryServices.java Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearch.java URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original) +++ ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearch.java Tue Sep 1 21:33:41 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 { @@ -714,7 +717,7 @@ productIds.add(searchResult.getString("mainProductId")); productIdSet.add(searchResult.getString("mainProductId")); - while (((searchResult = (GenericValue) eli.next()) != null) && (maxResults == null || numRetreived < maxResults.intValue())) { + while ((maxResults == null || numRetreived < maxResults.intValue()) && ((searchResult = (GenericValue) eli.next()) != null)) { String productId = searchResult.getString("mainProductId"); if (!productIdSet.contains(productId)) { productIds.add(productId); @@ -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/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java (original) +++ ofbiz/branches/executioncontext20090812/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/feature/EditFeatureCategoryFeatures.groovy Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/find/advancedsearchoptions.groovy Tue Sep 1 21:33:41 2009 @@ -21,9 +21,11 @@ import org.ofbiz.product.catalog.* import org.ofbiz.product.feature.* import org.ofbiz.product.product.* +import org.ofbiz.product.store.ProductStoreWorker; searchCategoryId = parameters.SEARCH_CATEGORY_ID; -if (!searchCategoryId || searchCategoryId.length() == 0) { +productStoreId = ProductStoreWorker.getProductStoreId(request); +if ((!searchCategoryId || searchCategoryId.length() == 0) && !productStoreId) { currentCatalogId = CatalogWorker.getCurrentCatalogId(request); searchCategoryId = CatalogWorker.getCatalogSearchCategoryId(request, currentCatalogId); } Modified: ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/WEB-INF/actions/product/ApplyFeaturesFromCategory.groovy Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/catalog/config/ConfigForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/config/ConfigForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/config/ConfigForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/config/ConfigForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/catalog/feature/FeatureForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/feature/FeatureForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/feature/FeatureForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/feature/FeatureForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/catalog/lookup/FieldLookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/lookup/FieldLookupForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/lookup/FieldLookupForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/lookup/FieldLookupForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/catalog/price/PriceForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/price/PriceForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/price/PriceForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/price/PriceForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/catalog/store/ProductStoreForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/store/ProductStoreForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/store/ProductStoreForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/catalog/store/ProductStoreForms.xml Tue Sep 1 21:33:41 2009 @@ -781,7 +781,7 @@ <field name="featurePercent" title="${uiLabelMap.ProductFeaturePerFeaturePercent}" tooltip="${uiLabelMap.ProductShipamount} : ${uiLabelMap.ProductShipamount} + ((${uiLabelMap.ProductOrderTotal} * ${uiLabelMap.ProductPercent}) * ${uiLabelMap.ProductTotalFeaturesApplied})"><text/></field> <field name="featurePrice" title="${uiLabelMap.ProductFeaturePerFeaturePrice}" tooltip="${uiLabelMap.ProductShipamount} : ${uiLabelMap.ProductShipamount} + (${uiLabelMap.ProductPrice} * ${uiLabelMap.ProductTotalFeaturesApplied})"><text/></field> - <field name="oversizeUnit" title="${uiLabelMap.ProductOversizeUnit}" tooltip="${uiLabelMap.ProductEach} ((${uiLabelMap.ProductHeight} * 2) + (${uiLabelMap.ProductWidth} * 2) + ${uiLabelMap.ProductDept}) >= ${uiLabelMap.CommonThis} ${uiLabelMap.ProductNumber}"><text/></field> + <field name="oversizeUnit" title="${uiLabelMap.ProductOversizeUnit}" tooltip="${uiLabelMap.ProductEach} ((${uiLabelMap.ProductHeight} * 2) + (${uiLabelMap.ProductWidth} * 2) + ${uiLabelMap.ProductDepth}) >= ${uiLabelMap.CommonThis} ${uiLabelMap.ProductNumber}"><text/></field> <field name="oversizePrice" title="${uiLabelMap.ProductOversizeSurcharge}" tooltip="${uiLabelMap.ProductShipamount} : ${uiLabelMap.ProductShipamount} + (${uiLabelMap.ProductOversizeNumber} * ${uiLabelMap.ProductSurcharge})"><text/></field> <field name="WeightTitle2" title="${uiLabelMap.CommonEmptyHeader}" tooltip="${uiLabelMap.ProductMinMax}" title-area-style="group-label"><display description=" " also-hidden="false"/></field> @@ -927,7 +927,7 @@ <field name="featurePrice" title="${uiLabelMap.ProductFeaturePerFeaturePrice}" tooltip="${uiLabelMap.ProductShipamount} : ${uiLabelMap.ProductShipamount} + (${uiLabelMap.ProductPrice} * ${uiLabelMap.ProductTotalFeaturesApplied})"><display/></field> <field name="OversizeTitle" title="${uiLabelMap.ProductOversizeTitle}" title-area-style="group-label"><display description=" " also-hidden="false"/></field> - <field name="oversizeUnit" title="${uiLabelMap.ProductOversizeUnit}" tooltip="${uiLabelMap.ProductEach} ((${uiLabelMap.ProductHeight} * 2) + (${uiLabelMap.ProductWidth} * 2) + ${uiLabelMap.ProductDept}) >= ${uiLabelMap.CommonThis} ${uiLabelMap.ProductNumber}"><display/></field> + <field name="oversizeUnit" title="${uiLabelMap.ProductOversizeUnit}" tooltip="${uiLabelMap.ProductEach} ((${uiLabelMap.ProductHeight} * 2) + (${uiLabelMap.ProductWidth} * 2) + ${uiLabelMap.ProductDepth}) >= ${uiLabelMap.CommonThis} ${uiLabelMap.ProductNumber}"><display/></field> <field name="oversizePrice" title="${uiLabelMap.ProductOversizeSurcharge}" tooltip="${uiLabelMap.ProductShipamount} : ${uiLabelMap.ProductShipamount} + (${uiLabelMap.ProductNumber} ${uiLabelMap.ProductOversize} ${uiLabelMap.ProductProducts} * ${uiLabelMap.ProductSurcharge})"><display/></field> <field name="WeightTitle1" title="${uiLabelMap.ProductWeightTitle1}" title-area-style="group-label"><display description=" " also-hidden="false"/></field> Modified: ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/facility/CountFacilityInventoryByProduct.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/facility/CountFacilityInventoryByProduct.groovy?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/facility/CountFacilityInventoryByProduct.groovy (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/facility/CountFacilityInventoryByProduct.groovy Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/facility/FindInventoryItemsByLabels.groovy Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/WEB-INF/actions/shipment/FindShipment.groovy Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/facility/facility/FacilityForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/facility/FacilityForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/facility/FacilityForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/facility/FacilityForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/webapp/facility/lookup/FieldLookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/lookup/FieldLookupForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/lookup/FieldLookupForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/webapp/facility/lookup/FieldLookupForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/widget/catalog/SubscriptionForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/widget/catalog/SubscriptionForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/widget/catalog/SubscriptionForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/widget/catalog/SubscriptionForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/product/widget/facility/ShipmentGatewayConfigForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/product/widget/facility/ShipmentGatewayConfigForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/product/widget/facility/ShipmentGatewayConfigForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/product/widget/facility/ShipmentGatewayConfigForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/workeffort/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/workeffort/servicedef/services.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/workeffort/servicedef/services.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/workeffort/servicedef/services.xml Tue Sep 1 21:33:41 2009 @@ -404,10 +404,9 @@ <service name="createWorkRequirementFulfillment" engine="simple" auth="true" location="component://workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" invoke="createWorkRequirementFulfillment"> <description>Creates a WorkRequirementFulfillment</description> - <auto-attributes include="pk" mode="IN" optional="false" entity-name="WorkRequirementFulfillment"/> + <auto-attributes include="pk" mode="IN" optional="true" entity-name="WorkRequirementFulfillment"/> <auto-attributes include="nonpk" mode="IN" optional="true" entity-name="WorkRequirementFulfillment"/> <auto-attributes include="all" mode="IN" optional="true" entity-name="Requirement"/> - <override name="requirementId" optional="true" mode="INOUT"/> </service> <service name="deleteWorkRequirementFulfillment" engine="simple" auth="true" location="component://workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" invoke="deleteWorkRequirementFulfillment"> @@ -734,9 +733,9 @@ location="org.ofbiz.workeffort.workeffort.WorkEffortServices" invoke="migrateWorkEffortEventReminders" auth="true"> <description>Migrate work effort event reminders. Run this service to update work effort reminders.</description> </service> - + <!-- WorkEffort and Survey Services --> - <service name="createWorkEffortSurveyAppl" engine="simple" default-entity-name="WorkEffortSurveyAppl" + <service name="createWorkEffortSurveyAppl" engine="simple" default-entity-name="WorkEffortSurveyAppl" location="component://workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" invoke="createWorkEffortSurveyAppl" auth="true"> <description>Create a WorkEffort Survey</description> <permission-service service-name="workEffortGenericPermission" main-action="CREATE"/> @@ -744,7 +743,7 @@ <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="fromDate" optional="true"/> </service> - <service name="updateWorkEffortSurveyAppl" default-entity-name="WorkEffortSurveyAppl" engine="simple" + <service name="updateWorkEffortSurveyAppl" default-entity-name="WorkEffortSurveyAppl" engine="simple" location="component://workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" invoke="updateWorkEffortSurveyAppl" auth="true"> <description>Update a WorkEffort Survey</description> <permission-service service-name="workEffortGenericPermission" main-action="UPDATE"/> Modified: ofbiz/branches/executioncontext20090812/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java (original) +++ ofbiz/branches/executioncontext20090812/applications/workeffort/src/org/ofbiz/workeffort/workeffort/WorkEffortSearch.java Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/workeffort/widget/LookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/workeffort/widget/LookupForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/workeffort/widget/LookupForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/workeffort/widget/LookupForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/workeffort/widget/TimesheetForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/workeffort/widget/TimesheetForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/workeffort/widget/TimesheetForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/workeffort/widget/TimesheetForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/applications/workeffort/widget/WorkEffortForms.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/applications/workeffort/widget/WorkEffortForms.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/applications/workeffort/widget/WorkEffortForms.xml (original) +++ ofbiz/branches/executioncontext20090812/applications/workeffort/widget/WorkEffortForms.xml Tue Sep 1 21:33:41 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/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContext.java URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContext.java?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContext.java (original) +++ ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContext.java Tue Sep 1 21:33:41 2009 @@ -56,14 +56,6 @@ */ public String getCurrencyUom(); - /** Returns the current <code>ExecutionArtifact</code> (the one - * at the top of the stack). Returns <code>null</code> if the - * stack is empty. - * - * @return The current <code>ExecutionArtifact</code> - */ - public ExecutionArtifact getCurrentArtifact(); - /** Returns the current execution path. Artifacts in the path are separated * with a slash. * @@ -100,10 +92,6 @@ /** Pop an <code>ExecutionArtifact</code> off the stack. */ public void popExecutionArtifact(); - /** Pops all <code>ExecutionArtifact</code>s off the stack - * up to and including <code>artifact</code>. */ - public void popExecutionArtifacts(ExecutionArtifact artifact); - /** Push an <code>ExecutionArtifact</code> on the stack. * * @param artifact Modified: ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContextImpl.java URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContextImpl.java?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContextImpl.java (original) +++ ofbiz/branches/executioncontext20090812/framework/api/src/org/ofbiz/api/context/ExecutionContextImpl.java Tue Sep 1 21:33:41 2009 @@ -65,10 +65,6 @@ return this.currencyUom; } - public ExecutionArtifact getCurrentArtifact() { - return this.artifactStack.size() > 0 ? this.artifactStack.getLast() : null; - } - public String getExecutionPath() { StringBuilder sb = new StringBuilder("ofbiz"); for (ExecutionArtifact artifact : this.artifactStack) { @@ -114,25 +110,6 @@ } } - public void popExecutionArtifacts(ExecutionArtifact artifact) { - if (this.artifactStack.size() == 0) { - // This check is temporary - it will be removed when implementation is complete - Debug.logError(new Exception("Attempt to pop an empty stack"), module); - return; - } - if (this.artifactStack.contains(artifact)) { - ExecutionArtifact poppedArtifact = this.artifactStack.removeLast(); - while (poppedArtifact != artifact) { - poppedArtifact = this.artifactStack.removeLast(); - } - } - if (this.verbose) { - Debug.logInfo("Popping artifact [" + artifact.getClass().getName() + - "] location = " + artifact.getLocation() + - ", name = " + artifact.getName(), module); - } - } - public void pushExecutionArtifact(ExecutionArtifact artifact) { this.artifactStack.addLast(artifact); if (this.verbose) { Modified: ofbiz/branches/executioncontext20090812/framework/base/src/org/ofbiz/base/util/UtilXml.java URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/framework/base/src/org/ofbiz/base/util/UtilXml.java?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/framework/base/src/org/ofbiz/base/util/UtilXml.java (original) +++ ofbiz/branches/executioncontext20090812/framework/base/src/org/ofbiz/base/util/UtilXml.java Tue Sep 1 21:33:41 2009 @@ -587,6 +587,25 @@ return newElement; } + /** Creates a child element with the given namespace supportive name and appends it to the element child node list. */ + public static Element addChildElementNSElement(Element element, String childElementName, + Document document, String nameSpaceUrl) { + Element newElement = document.createElementNS(nameSpaceUrl, childElementName); + element.appendChild(newElement); + return element; + } + + /** Creates a child element with the given namespace supportive name and appends it to the element child node list. + * Also creates a Text node with the given value and appends it to the new elements child node list. + */ + public static Element addChildElementNSValue(Element element, String childElementName, + String childElementValue, Document document, String nameSpaceUrl) { + Element newElement = document.createElementNS(nameSpaceUrl, childElementName); + newElement.appendChild(document.createTextNode(childElementValue)); + element.appendChild(newElement); + return element; + } + /** Creates a child element with the given name and appends it to the element child node list. * Also creates a CDATASection node with the given value and appends it to the new elements child node list. */ Modified: ofbiz/branches/executioncontext20090812/framework/base/src/org/ofbiz/base/util/template/XslTransform.java URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/framework/base/src/org/ofbiz/base/util/template/XslTransform.java?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/framework/base/src/org/ofbiz/base/util/template/XslTransform.java (original) +++ ofbiz/branches/executioncontext20090812/framework/base/src/org/ofbiz/base/util/template/XslTransform.java Tue Sep 1 21:33:41 2009 @@ -23,42 +23,83 @@ import java.net.URL; import java.net.URLConnection; import java.io.InputStream; +import java.io.IOException; +import java.io.StringWriter; +import org.xml.sax.InputSource; +import org.xml.sax.XMLReader; +import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilXml; import org.ofbiz.base.util.URLConnector; import org.ofbiz.base.util.cache.UtilCache; import org.ofbiz.base.location.FlexibleLocation; +import org.ofbiz.base.util.GeneralException; + import javax.xml.transform.Transformer; +import javax.xml.transform.Source; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; +import javax.xml.parsers.SAXParserFactory; +import javax.xml.transform.sax.SAXSource; import javax.xml.transform.Templates; -import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; + import org.w3c.dom.Document; import org.w3c.dom.Node; -import org.ofbiz.base.util.GeneralException; -import java.io.IOException; import javax.xml.transform.stream.StreamSource; +import javax.xml.transform.stream.StreamResult; -/** - * XslTransform - * - * This utility takes an input document and a XSL stylesheet and performs the - * transform, returning the output document. - * The input for both the input document and stylesheet can be in one of three forms - * - a URL to the doc, the doc in string form and the doc in DOM Document form. - * It keeps its own cache for storing the compiled transforms. - * - */ public final class XslTransform { public static final String module = XslTransform.class.getName(); public static UtilCache<String, Templates> xslTemplatesCache = new UtilCache<String, Templates>("XsltTemplates", 0, 0); + /** + * + * @param template the content or url of the xsl template + * @param data the content or url of the xml data file + * @param outWriter The Writer to render to + * @throws TransformerException + */ + public static String renderTemplate(String template, String data) + throws TransformerException { + String result = null; + TransformerFactory tfactory = TransformerFactory.newInstance(); + if (tfactory.getFeature(SAXSource.FEATURE)) { + // setup for xml data file preprocessing to be able to xinclude + SAXParserFactory pfactory= SAXParserFactory.newInstance(); + pfactory.setNamespaceAware(true); + pfactory.setValidating(false); + pfactory.setXIncludeAware(true); + XMLReader reader = null; + try { + reader = pfactory.newSAXParser().getXMLReader(); + } catch (Exception e) { + throw new TransformerException("Error creating SAX parser/reader", e); + } + // do the actual preprocessing + SAXSource source = new SAXSource(reader, new InputSource(data)); + // compile the xsl template + Transformer transformer = tfactory.newTransformer(new StreamSource(template)); + // and apply the xsl template to the source document and save in a result string + StringWriter sw = new StringWriter(); + StreamResult sr = new StreamResult(sw); + transformer.transform(source, sr); + result = sw.toString(); + } else { + Debug.logError("tfactory does not support SAX features!", module); + } + return result; + } + + /* + * it does not look like the rest of this file is working or used..........better set it to depreciated + * @deprecated + */ public static Document transform(Map<String, Object> context, Map<String, Object> params) throws GeneralException, IOException, TransformerConfigurationException, TransformerException { Document outputDocument = null; @@ -104,6 +145,10 @@ return outputDocument; } + /* + * it does not look like the rest of this file is working or used..........better set it to depreciated + * @deprecated + */ private static Source getSource(Document inputDocument, String inputUrl, String inputString) throws GeneralException, IOException { Source source = null; if (inputDocument != null) { Modified: ofbiz/branches/executioncontext20090812/framework/common/config/CommonErrorUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/executioncontext20090812/framework/common/config/CommonErrorUiLabels.xml?rev=810248&r1=810247&r2=810248&view=diff ============================================================================== --- ofbiz/branches/executioncontext20090812/framework/common/config/CommonErrorUiLabels.xml (original) +++ ofbiz/branches/executioncontext20090812/framework/common/config/CommonErrorUiLabels.xml Tue Sep 1 21:33:41 2009 @@ -22,51 +22,61 @@ <property key="ImageTransform.errors_occured_during_parsing"> <value xml:lang="en">Errors occured during parsing</value> <value xml:lang="fr">Des erreurs sont survenues lors de l'analyse</value> + <value xml:lang="hi_IN">पारà¥à¤¸à¤¿à¤à¤ à¤à¥ दà¥à¤°à¤¾à¤¨ तà¥à¤°à¥à¤à¤¿à¤¯à¤¾à¤ हà¥à¤</value> <value xml:lang="zh">è§£ææ¶åçé误</value> </property> <property key="ImageTransform.error_occurs_during_reading"> <value xml:lang="en">An error occurs during reading</value> <value xml:lang="fr">Une erreur est survenue lors de la lecture</value> + <value xml:lang="hi_IN">पढ़नॠà¤à¥ दà¥à¤°à¤¾à¤¨ à¤à¤ तà¥à¤°à¥à¤à¤¿ हॠरहॠहà¥</value> <value xml:lang="zh">è¯»åæ¶åçäºä¸ä¸ªé误</value> </property> <property key="ImageTransform.final_scale_factor_is_null"> <value xml:lang="en">Final scale factor is null</value> <value xml:lang="fr">Le facteur final de redimensionnement est nul</value> + <value xml:lang="hi_IN">ठà¤à¤¤à¤¿à¤® पà¥à¤®à¤¾à¤¨à¥ पहलॠnull हà¥</value> <value xml:lang="zh">æç»ç缩æ¾å 忝null</value> </property> <property key="ImageTransform.height_scale_factor_is_null"> <value xml:lang="en">Height scale factor is null</value> <value xml:lang="fr">Le facteur 'hauteur' de redimensionnement est nul</value> + <value xml:lang="hi_IN">à¤à¤à¤à¤¾à¤ पà¥à¤®à¤¾à¤¨à¥ पहलॠnull हà¥</value> <value xml:lang="zh">é«åº¦ç¼©æ¾å 忝null</value> </property> <property key="ImageTransform.input_is_null"> <value xml:lang="en">Input is null</value> <value xml:lang="fr">La valeur saisie est nulle</value> + <value xml:lang="hi_IN">à¤à¤¨à¤ªà¥à¤ null हà¥</value> <value xml:lang="zh">è¾å ¥æ¯null</value> </property> <property key="ImageTransform.error_prevents_the document_from_being_fully_parsed"> <value xml:lang="en">Error prevents the document from being fully parsed</value> <value xml:lang="fr">Une erreur empêche que le document soit entièrement analysé</value> + <value xml:lang="hi_IN">तà¥à¤°à¥à¤à¤¿ दसà¥à¤¤à¤¾à¤µà¥à¤à¤¼ à¤à¥ पà¥à¤°à¥ तरह पारà¥à¤¸ à¤à¤°à¤¨à¥ सॠरà¥à¤ रहॠहà¥</value> <value xml:lang="zh">åçéè¯¯é»æ¢äºææ¡£å®å ¨è§£æ</value> </property> <property key="ImageTransform.one_default_dimension_is_null"> <value xml:lang="en">One default dimension is null</value> <value xml:lang="fr">Une des dimensions par défaut est nulle</value> + <value xml:lang="hi_IN">à¤à¤ डिफ़à¥à¤²à¥à¤ à¤à¤¯à¤¾à¤® null हà¥</value> <value xml:lang="zh">ä¸ä¸ªç¼ºçç纬度æ¯null</value> </property> <property key="ImageTransform.root_element_has_not_been_set"> <value xml:lang="en">Root element has not been set</value> <value xml:lang="fr">L'élement racine n'a pas pu être chargé</value> + <value xml:lang="hi_IN">रà¥à¤ ततà¥à¤µ निरà¥à¤§à¤¾à¤°à¤¿à¤¤ नहà¥à¤ à¤à¤¿à¤¯à¤¾ à¤à¤¯à¤¾ हà¥</value> <value xml:lang="zh">å·²ç»è®¾ç½®äºæ ¹å ç´ </value> </property> <property key="ImageTransform.unknown_buffered_image_type"> <value xml:lang="en">Unknown buffered image type</value> <value xml:lang="fr">Le type d'image bufferisée est inconnu</value> + <value xml:lang="hi_IN">buffered à¤à¤µà¤¿ à¤à¤¾ ठà¤à¥à¤à¤¾à¤¤ पà¥à¤°à¤à¤¾à¤°</value> <value xml:lang="zh">æªç¥çç¼å²çå¾çç±»å</value> </property> <property key="ImageTransform.width_scale_factor_is_null"> <value xml:lang="en">Width scale factor is null</value> <value xml:lang="fr">Le facteur 'largeur' de redimensionnement est nul</value> + <value xml:lang="hi_IN">à¤à¥à¤¡à¤¼à¤¾à¤ पà¥à¤®à¤¾à¤¨à¥ à¤à¤¾à¤°à¤(Width scale factor) null हà¥</value> <value xml:lang="zh">宽度缩æ¾å 忝null</value> </property> </resource> |
Free forum by Nabble | Edit this page |