Skip to content

Commit

Permalink
Set viewIndex and viewSize as optionnal and if they aren't present re…
Browse files Browse the repository at this point in the history
…solve 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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1686691 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
nmalin committed Jun 21, 2015
1 parent 415de4e commit 7986eef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions applications/order/servicedef/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public static Map<String, Object> findOrders(DispatchContext dctx, Map<String, ?

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");
Expand Down
5 changes: 2 additions & 3 deletions applications/order/widget/ordermgr/OrderViewScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,15 @@ 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"/>
<set field="asm_formSize" value="1000"/>
<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">
Expand Down

0 comments on commit 7986eef

Please sign in to comment.