Author: nmalin
Date: Sun Jun 21 08:20:11 2015
New Revision: 1686691

URL: http://svn.apache.org/r1686691
Log:
Set viewIndex and viewSize as optionnal and if they aren't present resolve 
viewSize from widgets.properties and set viewIndex to one. related issue 
OFBIZ-6523, this allow to remove hard-code on link that call findOrder service

Modified:
    ofbiz/trunk/applications/order/servicedef/services.xml
    
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
    ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml

Modified: ofbiz/trunk/applications/order/servicedef/services.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services.xml?rev=1686691&r1=1686690&r2=1686691&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services.xml Sun Jun 21 08:20:11 
2015
@@ -852,8 +852,8 @@ under the License.
         <attribute name="includeCountry" type="String" mode="IN" 
optional="true"/>
 
         <!-- view and page fields -->
-        <attribute name="viewIndex" type="Integer" mode="INOUT" 
optional="true" default-value="0"/>
-        <attribute name="viewSize" type="Integer" mode="INOUT" optional="true" 
default-value="20"/>
+        <attribute name="viewIndex" type="Integer" mode="INOUT" 
optional="true"/>
+        <attribute name="viewSize" type="Integer" mode="INOUT" 
optional="true"/>
         <attribute name="showAll" type="String" mode="INOUT" optional="true"/>
 
         <!-- index fields -->

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java?rev=1686691&r1=1686690&r2=1686691&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderLookupServices.java
 Sun Jun 21 08:20:11 2015
@@ -67,7 +67,9 @@ public class OrderLookupServices {
 
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         Integer viewIndex = (Integer) context.get("viewIndex");
+        if (viewIndex == null) viewIndex = 1;
         Integer viewSize = (Integer) context.get("viewSize");
+        if (viewSize == null) viewSize = 
UtilProperties.getPropertyAsInteger("widget", "widget.form.defaultViewSize", 
20);
         String showAll = (String) context.get("showAll");
         String useEntryDate = (String) context.get("useEntryDate");
         Locale locale = (Locale) context.get("locale");

Modified: ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml?rev=1686691&r1=1686690&r2=1686691&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml 
(original)
+++ ofbiz/trunk/applications/order/widget/ordermgr/OrderViewScreens.xml Sun Jun 
21 08:20:11 2015
@@ -247,7 +247,7 @@ under the License.
                 <set field="headerItem" value="findorders"/>
                 <script 
location="component://order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy"/>
                 <script 
location="component://content/webapp/content/WEB-INF/actions/print/FindPrinters.groovy"/>
-                
+
                 <!-- asmslect parameters, must be prefixed by asm_ for 
setMultipleSelectJs.ftl -->
                 <set field="asm_multipleSelectForm"  value="lookuporder"/>
                 <set field="asm_multipleSelect"  value="roleTypeId"/>
@@ -255,8 +255,7 @@ under the License.
                 <set field="asm_asmListItemPercentOfForm" value="95"/>
                 <set field="asm_sortable" value="false"/>
                 <property-map resource="OrderUiLabels" map-name="uiLabelMap" 
global="true"/>
-                <set field="asm_title" 
value="${uiLabelMap.OrderPartySelectRoleForParty}"/>                
-                
+                <set field="asm_title" 
value="${uiLabelMap.OrderPartySelectRoleForParty}"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonOrderViewDecorator">


Reply via email to