You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@sandglass-software.com> on 2015/06/20 21:49:03 UTC

Re: svn commit: r1686667 - in /ofbiz/trunk/applications: order/servicedef/ party/config/ party/servicedef/ party/src/org/ofbiz/party/party/ party/webapp/partymgr/WEB-INF/actions/party/ party/widget/partymgr/

Please do not hard-code the widget default view size. Get the value from 
the widget.form.defaultViewSize property in widgets.properties.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 6/20/2015 12:43 PM, nmalin@apache.org wrote:
> Author: nmalin
> Date: Sat Jun 20 19:43:49 2015
> New Revision: 1686667
>
> URL: http://svn.apache.org/r1686667
> Log:
> Migrate findParty.ftl to form widgets, related issue OFBIZ-6227. Added a new service performFindParty oriented only on search operation (do not contains screen information that managed by screen widget) and convert the FindParty form to works very similar of the older but with widget capacity. Thanks Gil Portenseigne for this issue
>
> Added:
>      ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindParty.groovy   (with props)
> Modified:
>      ofbiz/trunk/applications/order/servicedef/services.xml
>      ofbiz/trunk/applications/party/config/PartyUiLabels.xml
>      ofbiz/trunk/applications/party/servicedef/services_view.xml
>      ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
>      ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml
>      ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml
>      ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
>
> Modified: ofbiz/trunk/applications/order/servicedef/services.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services.xml?rev=1686667&r1=1686666&r2=1686667&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/order/servicedef/services.xml (original)
> +++ ofbiz/trunk/applications/order/servicedef/services.xml Sat Jun 20 19:43:49 2015
> @@ -849,11 +849,11 @@ under the License.
>
>           <!-- ship to country fields -->
>           <attribute name="countryGeoId" type="String" mode="IN" optional="true"/>
> -        <attribute name="includeCountry" type="String" mode="IN" optional="true"/>
> +        <attribute name="includeCountry" type="String" mode="IN" optional="true"/>
>
>           <!-- view and page fields -->
> -        <attribute name="viewIndex" type="Integer" mode="INOUT" optional="false"/>
> -        <attribute name="viewSize" type="Integer" mode="INOUT" optional="false"/>
> +        <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="showAll" type="String" mode="INOUT" optional="true"/>
>
>           <!-- index fields -->
>
> Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.xml?rev=1686667&r1=1686666&r2=1686667&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/config/PartyUiLabels.xml (original)
> +++ ofbiz/trunk/applications/party/config/PartyUiLabels.xml Sat Jun 20 19:43:49 2015
> @@ -4890,6 +4890,10 @@
>           <value xml:lang="zh">联系信息</value>
>           <value xml:lang="zh-TW">聯絡資訊</value>
>       </property>
> +    <property key="PartyContactInformationOther">
> +        <value xml:lang="en">Other Contact Information</value>
> +        <value xml:lang="fr">Autres Coordonnées</value>
> +    </property>
>       <property key="PartyContactListPartyCreate">
>           <value xml:lang="ar">إضافة طرف لقائمة الإتصال</value>
>           <value xml:lang="de">Akteur zur Kontaktliste hinzufügen</value>
>
> Modified: ofbiz/trunk/applications/party/servicedef/services_view.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services_view.xml?rev=1686667&r1=1686666&r2=1686667&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/servicedef/services_view.xml (original)
> +++ ofbiz/trunk/applications/party/servicedef/services_view.xml Sat Jun 20 19:43:49 2015
> @@ -71,6 +71,42 @@ under the License.
>           <attribute name="sortField" type="String" mode="OUT" optional="true"/>
>       </service>
>
> +    <service name="performFindParty" engine="java"
> +        location="org.ofbiz.party.party.PartyServices" invoke="performFindParty">
> +        <description>General Party Find Service, duplicated for screen widget purpose, Used in the new findparty page in the Party Manager, etc</description>
> +        <attribute name="roleTypeId" type="String" mode="IN" optional="true"/> <!-- can be null or ANY to include any -->
> +        <attribute name="noConditionFind" type="String" mode="IN" optional="true" default-value="N"/>
> +        <attribute name="extInfo" type="String" mode="IN" optional="true"/>
> +        <attribute name="extCond" type="org.ofbiz.entity.condition.EntityCondition" mode="IN" optional="true">
> +            <description>EntityCondition that can be send to this service to manage complex search case</description>
> +        </attribute>
> +        <attribute name="partyId" type="String" mode="IN" optional="true"/> <!-- does a LIKE compare on this, can do partial, case insensitive, etc -->
> +        <attribute name="partyTypeId" type="String" mode="IN" optional="true"/>
> +        <attribute name="userLoginId" type="String" mode="IN" optional="true"/> <!-- does a LIKE compare on this, can do partial, case insensitive, etc -->
> +        <attribute name="groupName" type="String" mode="IN" optional="true"/>
> +        <attribute name="firstName" type="String" mode="IN" optional="true"/>
> +        <attribute name="lastName" type="String" mode="IN" optional="true"/>
> +        <attribute name="address1" type="String" mode="IN" optional="true"/>
> +        <attribute name="address2" type="String" mode="IN" optional="true"/>
> +        <attribute name="city" type="String" mode="IN" optional="true"/>
> +        <attribute name="stateProvinceGeoId" type="String" mode="IN" optional="true"/>
> +        <attribute name="postalCode" type="String" mode="IN" optional="true"/>
> +        <attribute name="infoString" type="String" mode="IN" optional="true"/> <!-- the ContactMech infoString -->
> +        <attribute name="countryCode" type="String" mode="IN" optional="true"/>
> +        <attribute name="areaCode" type="String" mode="IN" optional="true"/>
> +        <attribute name="contactNumber" type="String" mode="IN" optional="true"/>
> +        <attribute name="idValue" type="String" mode="IN" optional="true"/>
> +        <attribute name="partyIdentificationTypeId" type="String" mode="IN" optional="true"/>
> +        <attribute name="inventoryItemId" type="String" mode="IN" optional="true"/> <!-- does a LIKE compare on this -->
> +        <attribute name="serialNumber" type="String" mode="IN" optional="true"/> <!-- does a LIKE compare on this -->
> +        <attribute name="softIdentifier" type="String" mode="IN" optional="true"/> <!-- does a LIKE compare on this -->
> +        <attribute name="partyRelationshipTypeId" type="String" mode="IN" optional="true"/>
> +        <attribute name="ownerPartyIds" type="List" mode="IN" optional="true"/><!-- Lead Owners Parties -->
> +        <attribute name="sortField" type="String" mode="IN" optional="true"/>
> +
> +        <attribute name="listIt" type="org.ofbiz.entity.util.EntityListIterator" mode="OUT" optional="true"/>
> +    </service>
> +
>       <service name="getPartyContactMechValueMaps" engine="java"
>               transaction-timeout="7200"
>               location="org.ofbiz.party.contact.ContactMechServices" invoke="getPartyContactMechValueMaps" auth="true">
>
> 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=1686667&r1=1686666&r2=1686667&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 Sat Jun 20 19:43:49 2015
> @@ -25,6 +25,7 @@ import java.io.StringReader;
>   import java.nio.ByteBuffer;
>   import java.nio.charset.Charset;
>   import java.sql.Timestamp;
> +import java.util.ArrayList;
>   import java.util.Collection;
>   import java.util.HashMap;
>   import java.util.LinkedList;
> @@ -40,7 +41,9 @@ import org.ofbiz.base.util.UtilGenerics;
>   import org.ofbiz.base.util.UtilMisc;
>   import org.ofbiz.base.util.UtilProperties;
>   import org.ofbiz.base.util.UtilValidate;
> +import org.ofbiz.base.util.UtilHttp;
>   import org.ofbiz.entity.Delegator;
> +import org.ofbiz.entity.GenericEntity;
>   import org.ofbiz.entity.GenericEntityException;
>   import org.ofbiz.entity.GenericValue;
>   import org.ofbiz.entity.condition.EntityCondition;
> @@ -1009,12 +1012,13 @@ public class PartyServices {
>           return ServiceUtil.returnSuccess();
>       }
>
> +    @Deprecated // migration from ftl to widget in process.
>       public static Map<String, Object> findParty(DispatchContext dctx, Map<String, ? extends Object> context) {
>           Map<String, Object> result = ServiceUtil.returnSuccess();
>           Delegator delegator = dctx.getDelegator();
>           GenericValue userLogin = (GenericValue) context.get("userLogin");
>           Locale locale = (Locale) context.get("locale");
> -
> +
>           String extInfo = (String) context.get("extInfo");
>
>           // get the role types
> @@ -1509,6 +1513,382 @@ public class PartyServices {
>           return result;
>       }
>
> +    public static Map<String, Object> performFindParty(DispatchContext dctx, Map<String, ? extends Object> context) {
> +        Map<String, Object> result = ServiceUtil.returnSuccess();
> +        Delegator delegator = dctx.getDelegator();
> +        GenericValue userLogin = (GenericValue) context.get("userLogin");
> +        Locale locale = (Locale) context.get("locale");
> +        String extInfo = (String) context.get("extInfo");
> +        EntityCondition extCond = (EntityCondition) context.get("extCond");
> +        EntityListIterator listIt = null;
> +
> +        // get the lookup flag
> +        String noConditionFind = (String) context.get("noConditionFind");
> +
> +        // create the dynamic view entity
> +        DynamicViewEntity dynamicView = new DynamicViewEntity();
> +
> +        // default view settings
> +        dynamicView.addMemberEntity("PT", "Party");
> +        dynamicView.addAlias("PT", "partyId");
> +        dynamicView.addAlias("PT", "statusId");
> +        dynamicView.addAlias("PT", "partyTypeId");
> +        dynamicView.addAlias("PT", "createdDate");
> +        dynamicView.addAlias("PT", "lastModifiedDate");
> +        dynamicView.addRelation("one-nofk", "", "PartyType", ModelKeyMap.makeKeyMapList("partyTypeId"));
> +        dynamicView.addRelation("many", "", "UserLogin", ModelKeyMap.makeKeyMapList("partyId"));
> +
> +        // define the main condition & expression list
> +        List<EntityCondition> andExprs = new ArrayList<EntityCondition>();
> +        EntityCondition mainCond = null;
> +
> +        List<String> orderBy = new ArrayList<String>();
> +        String sortField = (String) context.get("sortField");
> +        if(UtilValidate.isNotEmpty(sortField)){
> +            orderBy.add(sortField);
> +        }
> +        List<String> fieldsToSelect = new ArrayList<String>();
> +        // fields we need to select; will be used to set distinct
> +        fieldsToSelect.add("partyId");
> +        fieldsToSelect.add("statusId");
> +        fieldsToSelect.add("partyTypeId");
> +        fieldsToSelect.add("createdDate");
> +        fieldsToSelect.add("lastModifiedDate");
> +
> +        // filter on parties that have relationship with logged in user
> +        String partyRelationshipTypeId = (String) context.get("partyRelationshipTypeId");
> +        if (UtilValidate.isNotEmpty(partyRelationshipTypeId)) {
> +            // add relation to view
> +            dynamicView.addMemberEntity("PRSHP", "PartyRelationship");
> +            dynamicView.addAlias("PRSHP", "partyIdTo");
> +            dynamicView.addAlias("PRSHP", "partyRelationshipTypeId");
> +            dynamicView.addViewLink("PT", "PRSHP", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId", "partyIdTo"));
> +            List<String> ownerPartyIds = UtilGenerics.cast(context.get("ownerPartyIds"));
> +            EntityCondition relationshipCond = null;
> +            if (UtilValidate.isEmpty(ownerPartyIds)) {
> +                String partyIdFrom = userLogin.getString("partyId");
> +                relationshipCond = EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("partyIdFrom"), EntityOperator.EQUALS, EntityFunction.UPPER(partyIdFrom));
> +            } else {
> +                relationshipCond = EntityCondition.makeCondition("partyIdFrom", EntityOperator.IN, ownerPartyIds);
> +            }
> +            dynamicView.addAlias("PRSHP", "partyIdFrom");
> +            // add the expr
> +            andExprs.add(EntityCondition.makeCondition(
> +                    relationshipCond, EntityOperator.AND,
> +                    EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("partyRelationshipTypeId"), EntityOperator.EQUALS, EntityFunction.UPPER(partyRelationshipTypeId))));
> +            fieldsToSelect.add("partyIdTo");
> +        }
> +
> +        // get the params
> +        String partyId = (String) context.get("partyId");
> +        String partyTypeId = (String) context.get("partyTypeId");
> +        String roleTypeId = (String) context.get("roleTypeId");
> +        String statusId = (String) context.get("statusId");
> +        String userLoginId = (String) context.get("userLoginId");
> +        String firstName = (String) context.get("firstName");
> +        String lastName = (String) context.get("lastName");
> +        String groupName = (String) context.get("groupName");
> +
> +        // check for a partyId
> +        if (UtilValidate.isNotEmpty(partyId)) {
> +            andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("partyId"), EntityOperator.LIKE, EntityFunction.UPPER("%"+partyId+"%")));
> +        }
> +
> +        // now the statusId - send ANY for all statuses; leave null for just enabled; or pass a specific status
> +        if (UtilValidate.isNotEmpty(statusId)) {
> +            andExprs.add(EntityCondition.makeCondition("statusId", statusId));
> +        } else {
> +            // NOTE: _must_ explicitly allow null as it is not included in a not equal in many databases... odd but true
> +            andExprs.add(EntityCondition.makeCondition(EntityCondition.makeCondition("statusId", GenericEntity.NULL_FIELD), EntityOperator.OR, EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "PARTY_DISABLED")));
> +        }
> +        // check for partyTypeId
> +        if (UtilValidate.isNotEmpty(partyTypeId)) {
> +            andExprs.add(EntityCondition.makeCondition("partyTypeId", partyTypeId));
> +        }
> +
> +        // ----
> +        // UserLogin Fields
> +        // ----
> +
> +        // filter on user login
> +        if (UtilValidate.isNotEmpty(userLoginId)) {
> +
> +            // modify the dynamic view
> +            dynamicView.addMemberEntity("UL", "UserLogin");
> +            dynamicView.addAlias("UL", "userLoginId");
> +            dynamicView.addViewLink("PT", "UL", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
> +
> +            // add the expr
> +            andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("userLoginId"), EntityOperator.LIKE, EntityFunction.UPPER("%"+userLoginId+"%")));
> +            fieldsToSelect.add("userLoginId");
> +        }
> +
> +        // ----
> +        // PartyGroup Fields
> +        // ----
> +
> +        // filter on groupName
> +        if (UtilValidate.isNotEmpty(groupName)) {
> +
> +            // modify the dynamic view
> +            dynamicView.addMemberEntity("PG", "PartyGroup");
> +            dynamicView.addAlias("PG", "groupName");
> +            dynamicView.addViewLink("PT", "PG", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
> +
> +            // add the expr
> +            andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("groupName"), EntityOperator.LIKE, EntityFunction.UPPER("%"+groupName+"%")));
> +            fieldsToSelect.add("groupName");
> +        }
> +
> +        // ----
> +        // Person Fields
> +        // ----
> +
> +        // modify the dynamic view
> +        if (UtilValidate.isNotEmpty(firstName) || UtilValidate.isNotEmpty(lastName)) {
> +            dynamicView.addMemberEntity("PE", "Person");
> +            dynamicView.addAlias("PE", "firstName");
> +            dynamicView.addAlias("PE", "lastName");
> +            dynamicView.addViewLink("PT", "PE", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
> +
> +            fieldsToSelect.add("firstName");
> +            fieldsToSelect.add("lastName");
> +            orderBy.add("lastName");
> +            orderBy.add("firstName");
> +        }
> +
> +        // filter on firstName
> +        if (UtilValidate.isNotEmpty(firstName)) {
> +            andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("firstName"), EntityOperator.LIKE, EntityFunction.UPPER("%"+firstName+"%")));
> +        }
> +
> +        // filter on lastName
> +        if (UtilValidate.isNotEmpty(lastName)) {
> +            andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("lastName"), EntityOperator.LIKE, EntityFunction.UPPER("%"+lastName+"%")));
> +        }
> +
> +        // ----
> +        // RoleType Fields
> +        // ----
> +
> +        // filter on role member
> +        if (UtilValidate.isNotEmpty(roleTypeId)) {
> +
> +            // add role to view
> +            dynamicView.addMemberEntity("PR", "PartyRole");
> +            dynamicView.addAlias("PR", "roleTypeId");
> +            dynamicView.addViewLink("PT", "PR", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
> +
> +            // add the expr
> +            andExprs.add(EntityCondition.makeCondition("roleTypeId", roleTypeId));
> +            fieldsToSelect.add("roleTypeId");
> +        }
> +
> +        // ----
> +        // PartyIdentification Fields
> +        // ----
> +
> +        String idValue = (String) context.get("idValue");
> +        String partyIdentificationTypeId = (String) context.get("partyIdentificationTypeId");
> +        if ("I".equals(extInfo) ||
> +                UtilValidate.isNotEmpty(idValue) ||
> +                UtilValidate.isNotEmpty(partyIdentificationTypeId)) {
> +
> +            // add role to view
> +            dynamicView.addMemberEntity("PAI", "PartyIdentification");
> +            dynamicView.addAlias("PAI", "idValue");
> +            dynamicView.addAlias("PAI", "partyIdentificationTypeId");
> +            dynamicView.addViewLink("PT", "PAI", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
> +            fieldsToSelect.add("idValue");
> +            fieldsToSelect.add("partyIdentificationTypeId");
> +            if (UtilValidate.isNotEmpty(idValue)) {
> +                andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("idValue"), EntityOperator.LIKE, EntityFunction.UPPER("%".concat(idValue).concat("%"))));
> +            }
> +            if (UtilValidate.isNotEmpty(partyIdentificationTypeId)) {
> +                andExprs.add(EntityCondition.makeCondition("partyIdentificationTypeId", partyIdentificationTypeId));
> +            }
> +        }
> +
> +        // ----
> +        // InventoryItem Fields
> +        // ----
> +
> +        // filter on inventory item's fields
> +        String inventoryItemId = (String) context.get("inventoryItemId");
> +        String serialNumber = (String) context.get("serialNumber");
> +        String softIdentifier = (String) context.get("softIdentifier");
> +        if (UtilValidate.isNotEmpty(inventoryItemId) ||
> +                UtilValidate.isNotEmpty(serialNumber) ||
> +                UtilValidate.isNotEmpty(softIdentifier)) {
> +
> +            // add role to view
> +            dynamicView.addMemberEntity("II", "InventoryItem");
> +            dynamicView.addAlias("II", "ownerPartyId");
> +            dynamicView.addViewLink("PT", "II", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId", "ownerPartyId"));
> +        }
> +        if (UtilValidate.isNotEmpty(inventoryItemId)) {
> +            dynamicView.addAlias("II", "inventoryItemId");
> +            // add the expr
> +            andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("inventoryItemId"), EntityOperator.LIKE, EntityFunction.UPPER("%" + inventoryItemId + "%")));
> +            fieldsToSelect.add("inventoryItemId");
> +        }
> +        if (UtilValidate.isNotEmpty(serialNumber)) {
> +            dynamicView.addAlias("II", "serialNumber");
> +            // add the expr
> +            andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("serialNumber"), EntityOperator.LIKE, EntityFunction.UPPER("%" + serialNumber + "%")));
> +            fieldsToSelect.add("serialNumber");
> +        }
> +        if (UtilValidate.isNotEmpty(softIdentifier)) {
> +            dynamicView.addAlias("II", "softIdentifier");
> +            // add the expr
> +            andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("softIdentifier"), EntityOperator.LIKE, EntityFunction.UPPER("%" + softIdentifier + "%")));
> +            fieldsToSelect.add("softIdentifier");
> +        }
> +
> +        // ----
> +        // PostalAddress fields
> +        // ----
> +        String stateProvinceGeoId = (String) context.get("stateProvinceGeoId");
> +        if ( "P".equals(extInfo) ||
> +                UtilValidate.isNotEmpty(context.get("address1"))|| UtilValidate.isNotEmpty(context.get("address2"))||
> +                UtilValidate.isNotEmpty(context.get("city"))|| UtilValidate.isNotEmpty(context.get("postalCode"))||
> +                UtilValidate.isNotEmpty(context.get("countryGeoId"))|| (UtilValidate.isNotEmpty(stateProvinceGeoId))) {
> +            // add address to dynamic view
> +            dynamicView.addMemberEntity("PC", "PartyContactMech");
> +            dynamicView.addMemberEntity("PA", "PostalAddress");
> +            dynamicView.addAlias("PC", "contactMechId");
> +            dynamicView.addAlias("PA", "address1");
> +            dynamicView.addAlias("PA", "address2");
> +            dynamicView.addAlias("PA", "city");
> +            dynamicView.addAlias("PA", "stateProvinceGeoId");
> +            dynamicView.addAlias("PA", "countryGeoId");
> +            dynamicView.addAlias("PA", "postalCode");
> +            dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
> +            dynamicView.addViewLink("PC", "PA", Boolean.FALSE, ModelKeyMap.makeKeyMapList("contactMechId"));
> +
> +            // filter on address1
> +            String address1 = (String) context.get("address1");
> +            if (UtilValidate.isNotEmpty(address1)) {
> +                andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("address1"), EntityOperator.LIKE, EntityFunction.UPPER("%" + address1 + "%")));
> +            }
> +
> +            // filter on address2
> +            String address2 = (String) context.get("address2");
> +            if (UtilValidate.isNotEmpty(address2)) {
> +                andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("address2"), EntityOperator.LIKE, EntityFunction.UPPER("%" + address2 + "%")));
> +            }
> +
> +            // filter on city
> +            String city = (String) context.get("city");
> +            if (UtilValidate.isNotEmpty(city)) {
> +                andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("city"), EntityOperator.LIKE, EntityFunction.UPPER("%" + city + "%")));
> +            }
> +
> +            // filter on state geo
> +            if (UtilValidate.isNotEmpty(stateProvinceGeoId)) {
> +                andExprs.add(EntityCondition.makeCondition("stateProvinceGeoId", stateProvinceGeoId));
> +            }
> +
> +            // filter on postal code
> +            String postalCode = (String) context.get("postalCode");
> +            if (UtilValidate.isNotEmpty(postalCode)) {
> +                andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("postalCode"), EntityOperator.LIKE, EntityFunction.UPPER("%" + postalCode + "%")));
> +            }
> +
> +            fieldsToSelect.add("postalCode");
> +            fieldsToSelect.add("city");
> +            fieldsToSelect.add("stateProvinceGeoId");
> +        }
> +
> +        // ----
> +        // Generic CM Fields
> +        // ----
> +        if ("O".equals(extInfo) || UtilValidate.isNotEmpty(context.get("infoString"))) {
> +            // add info to dynamic view
> +            dynamicView.addMemberEntity("PC", "PartyContactMech");
> +            dynamicView.addMemberEntity("CM", "ContactMech");
> +            dynamicView.addAlias("PC", "contactMechId");
> +            dynamicView.addAlias("CM", "infoString");
> +            dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
> +            dynamicView.addViewLink("PC", "CM", Boolean.FALSE, ModelKeyMap.makeKeyMapList("contactMechId"));
> +
> +            // filter on infoString
> +            String infoString = (String) context.get("infoString");
> +            if (UtilValidate.isNotEmpty(infoString)) {
> +                andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("infoString"), EntityOperator.LIKE, EntityFunction.UPPER("%"+infoString+"%")));
> +                fieldsToSelect.add("infoString");
> +            }
> +        }
> +
> +        // ----
> +        // TelecomNumber Fields
> +        // ----
> +        if ("T".equals(extInfo)
> +                || UtilValidate.isNotEmpty(context.get("countryCode"))
> +                || UtilValidate.isNotEmpty(context.get("areaCode"))
> +                || UtilValidate.isNotEmpty(context.get("contactNumber"))) {
> +            // add telecom to dynamic view
> +            dynamicView.addMemberEntity("PC", "PartyContactMech");
> +            dynamicView.addMemberEntity("TM", "TelecomNumber");
> +            dynamicView.addAlias("PC", "contactMechId");
> +            dynamicView.addAlias("TM", "countryCode");
> +            dynamicView.addAlias("TM", "areaCode");
> +            dynamicView.addAlias("TM", "contactNumber");
> +            dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
> +            dynamicView.addViewLink("PC", "TM", Boolean.FALSE, ModelKeyMap.makeKeyMapList("contactMechId"));
> +
> +            // filter on countryCode
> +            String countryCode = (String) context.get("countryCode");
> +            if (UtilValidate.isNotEmpty(countryCode)) {
> +                andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("countryCode"), EntityOperator.EQUALS, EntityFunction.UPPER(countryCode)));
> +            }
> +
> +            // filter on areaCode
> +            String areaCode = (String) context.get("areaCode");
> +            if (UtilValidate.isNotEmpty(areaCode)) {
> +                andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("areaCode"), EntityOperator.EQUALS, EntityFunction.UPPER(areaCode)));
> +            }
> +
> +            // filter on contact number
> +            String contactNumber = (String) context.get("contactNumber");
> +            if (UtilValidate.isNotEmpty(contactNumber)) {
> +                andExprs.add(EntityCondition.makeCondition(EntityFunction.UPPER_FIELD("contactNumber"), EntityOperator.EQUALS, EntityFunction.UPPER(contactNumber)));
> +            }
> +            fieldsToSelect.add("contactNumber");
> +            fieldsToSelect.add("areaCode");
> +        }
> +        // ---- End of Dynamic View Creation
> +
> +        // build the main condition, add the extend condition is it present
> +        if (UtilValidate.isNotEmpty(extCond)) andExprs.add(extCond);
> +        if (UtilValidate.isNotEmpty(andExprs)) mainCond = EntityCondition.makeCondition(andExprs, EntityOperator.AND);
> +        if (Debug.infoOn()) Debug.logInfo("In findParty mainCond=" + mainCond, module);
> +
> +        // do the lookup
> +        if (UtilValidate.isNotEmpty(noConditionFind) &&
> +                ("Y".equals(noConditionFind) || andExprs.size()>1)) { //exclude on condition the status expr
> +            try {
> +                // set distinct on so we only get one row per party
> +                // using list iterator
> +                listIt = EntityQuery.use(delegator).select(UtilMisc.toSet(fieldsToSelect))
> +                        .from(dynamicView)
> +                        .where(mainCond)
> +                        .orderBy(orderBy)
> +                        .cursorScrollInsensitive()
> +                        .distinct()
> +                        .queryIterator();
> +            } catch (GenericEntityException e) {
> +                String errMsg = "Failure in party find operation, rolling back transaction: " + e.toString();
> +                Debug.logError(e, errMsg, module);
> +                return ServiceUtil.returnError(UtilProperties.getMessage(resource,
> +                        "PartyLookupPartyError",
> +                        UtilMisc.toMap("errMessage", e.toString()), locale));
> +            }
> +        }
> +        result.put("listIt", listIt);
> +        return result;
> +    }
> +
>       /**
>        * Changes the association of contact mechs, purposes, notes, orders and attributes from
>        * one party to another for the purpose of merging records together. Flags the from party
>
> Added: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindParty.groovy
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindParty.groovy?rev=1686667&view=auto
> ==============================================================================
> --- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindParty.groovy (added)
> +++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindParty.groovy Sat Jun 20 19:43:49 2015
> @@ -0,0 +1,33 @@
> +/*
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements.  See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership.  The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License.  You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied.  See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +import org.ofbiz.base.util.*;
> +
> +if (!context.extInfo || context.extInfo == 'N') {
> +    if (parameters.partyIdentificationTypeId || parameters.idValue) context.extInfo='I';
> +    else if (parameters.address1
> +            || parameters.address2
> +            || parameters.city
> +            || parameters.postalCode
> +            || parameters.stateProvinceGeoId) context.extInfo='P';
> +    else if (parameters.countryCode
> +            || parameters.areaCode
> +            || parameters.contactNumber) context.extInfo='T';
> +    else if (parameters.infoString) context.extInfo='O';
> +    if (!context.extInfo) context.extInfo == 'N';
> +}
> \ No newline at end of file
>
> Propchange: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindParty.groovy
> ------------------------------------------------------------------------------
>      svn:eol-style = native
>
> Propchange: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindParty.groovy
> ------------------------------------------------------------------------------
>      svn:keywords = Date Rev Author URL Id
>
> Propchange: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/FindParty.groovy
> ------------------------------------------------------------------------------
>      svn:mime-type = text/plain
>
> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=1686667&r1=1686666&r2=1686667&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml (original)
> +++ ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml Sat Jun 20 19:43:49 2015
> @@ -21,6 +21,167 @@ under the License.
>   <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>           xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
>
> +    <form name="lookupparty" type="single" target="findparty" focus-field-name="partyName">
> +        <actions>
> +            <set field="states" value="${groovy: org.ofbiz.common.CommonWorkers.getStateList(delegator)}"/>
> +            <!-- Here is some alternate code to get states limited to a region
> +                <set field="states" value="${groovy: org.ofbiz.common.CommonWorkers.getAssociatedStateList(delegator,requestParameters.CUSTOMER_COUNTRY)}"/>
> +            -->
> +        </actions>
> +        <field name="statusId"><hidden value="PARTY_ENABLED"/></field>
> +        <field name="noConditionFind"><hidden value="Y"/></field>
> +        <field name="extInfo" event="onClick" action="javascript:$('#ListParty' + this.value +'_body').toggle(true);" title="${uiLabelMap.PartyContactInformation}">
> +            <radio>
> +                <option key="N" description="${uiLabelMap.CommonNone}"/>
> +                <option key="P" description="${uiLabelMap.PartyPostal}"/>
> +                <option key="T" description="${uiLabelMap.PartyTelecom}"/>
> +                <option key="O" description="${uiLabelMap.CommonOther}"/>
> +            </radio>
> +        </field>
> +        <field name="hideFields"><hidden value="Y"/></field>
> +        <field name="partyId"><text size="15" /></field>
> +        <field name="userLoginId"><text size="15" /></field>
> +        <field name="lastName"><text size="15"/></field>
> +        <field name="firstName"><text size="15"/></field>
> +        <field name="partyGroupName" title="${uiLabelMap.PartyGroupName}"><text size="15"/></field>
> +        <field name="roleTypeId">
> +            <drop-down allow-empty="true">
> +                <entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId">
> +                    <entity-order-by field-name="description"/>
> +                </entity-options>
> +            </drop-down>
> +        </field>
> +        <field name="partyTypeId" title="${uiLabelMap.CommonType}">
> +            <drop-down allow-empty="true">
> +                <entity-options description="${description}" entity-name="PartyType"/>
> +            </drop-down>
> +        </field>
> +        <field name="idValue"><text size="15"/></field>
> +        <field name="partyIdentificationTypeId">
> +            <drop-down allow-empty="true">
> +                <entity-options description="${description}" entity-name="PartyIdentificationType"/>
> +            </drop-down>
> +        </field>
> +        <field name="address1"><text size="15"/></field>
> +        <field name="address2"><text size="15"/></field>
> +        <field name="city"><text size="15"/></field>
> +        <field name="stateProvinceGeoId">
> +            <drop-down allow-empty="true">
> +                <list-options list-name="states" key-name="geoId" description="${geoName}"/>
> +            </drop-down>
> +        </field>
> +        <field name="postalCode"><text size="6"/></field>
> +        <field name="countryCode" title="${uiLabelMap.CommonCountryCode}"><text size="15"/></field>
> +        <field name="areaCode" title="${uiLabelMap.PartyAreaCode}"><text size="15"/></field>
> +        <field name="contactNumber" title="${uiLabelMap.PartyContactNumber}"><text size="15"/></field>
> +        <field name="infoString" title="${uiLabelMap.PartyContactInformation}">
> +            <text size="15"/>
> +        </field>
> +        <field name="partyClassificationGroupId" title=" " use-when="parentTypeId == null">
> +            <drop-down allow-multiple="true" size="20" allow-empty="true">
> +                <entity-options description="${description}" entity-name="PartyClassificationGroupAndType">
> +                    <entity-order-by field-name="partyClassificationTypeId"/>
> +                </entity-options>
> +            </drop-down>
> +        </field>
> +        <field name="inventoryItemId"><text size="15"/></field>
> +        <field name="serialNumber"><text size="15"/></field>
> +        <field name="softIdentifier"><text size="15"/></field>
> +        <field name="searchButton" widget-style="search"><submit/></field>
> +        <sort-order>
> +            <sort-field name="extInfo"/>
> +            <sort-field name="partyId"/>
> +            <sort-field name="userLoginId"/>
> +            <sort-field name="lastName"/>
> +            <sort-field name="firstName"/>
> +            <sort-field name="partyGroupName"/>
> +            <sort-field name="roleTypeId"/>
> +            <sort-field name="partyTypeId"/>
> +            <field-group title="${uiLabelMap.PartyPartyIdentification}" initially-collapsed="true">
> +                <sort-field name="idValue"/>
> +                <sort-field name="partyIdentificationTypeId"/>
> +            </field-group>
> +            <field-group title="${uiLabelMap.PartyPostal}" initially-collapsed="true" id="ListPartyP">
> +                <sort-field name="address1"/>
> +                <sort-field name="address2"/>
> +                <sort-field name="city"/>
> +                <sort-field name="stateProvinceGeoId"/>
> +                <sort-field name="postalCode"/>
> +            </field-group>
> +            <field-group title="${uiLabelMap.PartyTelecom}" initially-collapsed="true" id="ListPartyT">
> +                <sort-field name="countryCode"/>
> +                <sort-field name="areaCode"/>
> +                <sort-field name="contactNumber"/>
> +            </field-group>
> +            <field-group title="${uiLabelMap.PartyContactInformationOther}" initially-collapsed="true" id="ListPartyO">
> +                <sort-field name="infoString"/>
> +            </field-group>
> +            <field-group title="${uiLabelMap.ProductProduct}" initially-collapsed="true">
> +                <sort-field name="inventoryItemId"/>
> +                <sort-field name="serialNumber"/>
> +                <sort-field name="softIdentifier"/>
> +            </field-group>
> +            <sort-field name="searchButton"/>
> +        </sort-order>
> +    </form>
> +
> +    <grid name="ListParty" type="list" target="deletePartyRate" list-name="listIt"
> +          odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
> +        <actions>
> +            <service service-name="performFindParty" auto-field-map="parameters" result-map-list="listIt"/>
> +        </actions>
> +        <row-actions>
> +            <entity-and entity-name="UserLogin" list="logins" use-cache="true">
> +                <field-map field-name="partyId" from-field="partyId"/>
> +            </entity-and>
> +            <set field="userLoginSize" value="${util:size(logins)}" type="Integer"/>
> +            <service service-name="getPartyMainRole" result-map="mainRole">
> +                <field-map field-name="partyId" from-field="partyId"/>
> +                <field-map field-name="userLogin" from-field="userLogin"/>
> +            </service>
> +        </row-actions>
> +        <field name="partyId" sort-field="true">
> +            <hyperlink target="viewprofile" description="${partyId}">
> +                <parameter param-name="partyId"/>
> +            </hyperlink>
> +        </field>
> +        <field name="userLoginId" use-when="userLoginSize > 1"><include-grid name="ListPartyUserLogin" location="component://party/widget/partymgr/PartyForms.xml"/></field>
> +        <field name="userLoginId" use-when="userLoginSize == 1"><display description="${logins[0].userLoginId}"/></field>
> +        <field name="userLoginId" use-when="userLoginSize == 0"><display description="(${uiLabelMap.CommonNone})"/></field>
> +        <field name="name"><display description="${groovy:org.ofbiz.party.party.PartyHelper.getPartyName(delegator, partyId, true)}"/></field>
> +        <field name="partyTypeId" title="${uiLabelMap.CommonType}"><display-entity entity-name="PartyType"/></field>
> +        <field name="mainRole" title="${uiLabelMap.PartyMainRole}"><display description="${mainRole.description}"/></field>
> +        <field name="createdDate" sort-field="true"><display type="date"/></field>
> +        <field name="lastModifiedDate" sort-field="true"><display type="date"/></field>
> +        <field name="partyAction" title=" "><include-menu name="ListPartyAction" location="component://party/widget/partymgr/PartyMenus.xml"/></field>
> +        <sort-order>
> +             <last-field name="createdDate"/>
> +             <last-field name="lastModifiedDate"/>
> +             <last-field name="partyAction"/>
> +        </sort-order>
> +    </grid>
> +
> +    <grid name="ListPartyN" extends="ListParty"/>
> +    <grid name="ListPartyI" extends="ListParty">
> +        <field name="idValue" sort-field="true"><display/></field>
> +        <field name="partyIdentificationTypeId" sort-field="true"><display-entity entity-name="PartyIdentificationType"/></field>
> +    </grid>
> +    <grid name="ListPartyP" extends="ListParty">
> +        <field name="city" sort-field="true"><display description="${city}, ${stateProvinceGeoId}"/></field>
> +        <field name="postalCode" sort-field="true"><display/></field>
> +    </grid>
> +    <grid name="ListPartyT" extends="ListParty">
> +        <field name="contactNumber" title="${uiLabelMap.PartyContactNumber}" sort-field="true"><display/></field>
> +    </grid>
> +    <grid name="ListPartyO" extends="ListParty">
> +        <field name="infoString" title="${uiLabelMap.PartyContactInformation}"><display/></field>
> +    </grid>
> +    <grid name="ListPartyUserLogin" type="list" list-name="logins" default-table-style="basic-table" hide-header="true">
> +        <field name="userLoginId"><display/></field>
> +        <field name="enabled"><display/></field>
> +        <field name="disabledDateTime"><display type="date"/></field>
> +    </grid>
> +
>       <form name="EditPerson" type="single" target="updatePerson" default-map-name="personInfo"
>           focus-field-name="salutation" header-row-style="header-row" default-table-style="basic-table">
>           <alt-target use-when="personInfo==null" target="createPerson"/>
>
> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml?rev=1686667&r1=1686666&r2=1686667&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml (original)
> +++ ofbiz/trunk/applications/party/widget/partymgr/PartyMenus.xml Sat Jun 20 19:43:49 2015
> @@ -265,6 +265,42 @@
>               </link>
>           </menu-item>
>       </menu>
> +    <menu name="ListPartyAction" extends="CommonInlineBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
> +        <menu-item name="searchorders" title="${uiLabelMap.OrderOrders}">
> +            <condition>
> +                <if-has-permission permission="ORDERMGR" action="_CREATE"/>
> +            </condition>
> +            <link target="/ordermgr/control/searchorders" url-mode="inter-app" link-type="hidden-form">
> +                <parameter param-name="lookupFlag" value="Y"/>
> +                <parameter param-name="hideFields" value="Y"/>
> +                <parameter param-name="partyId"/>
> +            </link>
> +        </menu-item>
> +        <menu-item name="findQuote" title="${uiLabelMap.OrderOrderQuotes}">
> +            <condition>
> +                <if-has-permission permission="ORDERMGR" action="_VIEW"/>
> +            </condition>
> +            <link target="/ordermgr/control/FindQuote" url-mode="inter-app">
> +                <parameter param-name="partyId"/>
> +            </link>
> +        </menu-item>
> +        <menu-item name="newQuote" title="${uiLabelMap.OrderNewQuote}">
> +            <condition>
> +                <if-has-permission permission="ORDERMGR" action="_CREATE"/>
> +            </condition>
> +            <link target="/ordermgr/control/EditQuote" url-mode="inter-app">
> +                <parameter param-name="partyId"/>
> +            </link>
> +        </menu-item>
> +        <menu-item name="newOrder" title="${uiLabelMap.OrderNewOrder}">
> +            <condition>
> +                <if-has-permission permission="ORDERMGR" action="_CREATE"/>
> +            </condition>
> +            <link target="/ordermgr/control/checkinits" url-mode="inter-app">
> +                <parameter param-name="partyId"/>
> +            </link>
> +        </menu-item>
> +    </menu>
>
>       <menu name="groupUpdate">
>           <menu-item name="update" title="${uiLabelMap.CommonUpdate}">
>
> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=1686667&r1=1686666&r2=1686667&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original)
> +++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Sat Jun 20 19:43:49 2015
> @@ -28,8 +28,8 @@ under the License.
>                   <set field="titleProperty" value="PageTitleFindParty"/>
>                   <set field="headerItem" value="find"/>
>                   <set field="tabButtonItem" value="findparty"/>
> -
> -                <service service-name="findParty" auto-field-map="parameters"/>
> +                <set field="initialyCollapsed" value="${groovy:'Y'.equals(parameters.hideFields)}" type="String"/>
> +                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/FindParty.groovy"/>
>               </actions>
>               <widgets>
>                   <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
> @@ -40,9 +40,12 @@ under the License.
>                                   <if-service-permission service-name="partyBasePermissionCheck" main-action="VIEW"/>
>                               </condition>
>                               <widgets>
> -                                <platform-specific>
> -                                    <html><html-template location="component://party/webapp/partymgr/party/findparty.ftl"/></html>
> -                                </platform-specific>
> +                                <screenlet id="FindPartyPanel" title="${uiLabelMap.PartyFindParty}" navigation-form-name="lookupparty" save-collapsed="false" collapsible="true" initially-collapsed="${initialyCollapsed}">
> +                                    <include-form name="lookupparty" location="component://party/widget/partymgr/PartyForms.xml"/>
> +                                </screenlet>
> +                                <screenlet title="${uiLabelMap.CommonSearchResults}" navigation-form-name="ListParty">
> +                                    <include-grid name="ListParty${extInfo}" location="component://party/widget/partymgr/PartyForms.xml"/>
> +                                </screenlet>
>                               </widgets>
>                               <fail-widgets>
>                                   <label style="h3" text="${uiLabelMap.PartyMgrViewPermissionError}"/>
> @@ -53,7 +56,6 @@ under the License.
>               </widgets>
>           </section>
>       </screen>
> -
>       <!-- Party Profile Screens -->
>
>       <screen name="viewprofile">
>
>


Re: svn commit: r1686667 - in /ofbiz/trunk/applications: order/servicedef/ party/config/ party/servicedef/ party/src/org/ofbiz/party/party/ party/webapp/partymgr/WEB-INF/actions/party/ party/widget/partymgr/

Posted by Nicolas Malin <ni...@nereide.fr>.
Le 20/06/2015 21:49, Adrian Crum a écrit :
> Please do not hard-code the widget default view size. Get the value 
> from the widget.form.defaultViewSize property in widgets.properties. 
Adiran you talk about this ?

--- ofbiz/trunk/applications/order/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services.xml Sat Jun 20 
19:43:49 2015
@@ -849,11 +849,11 @@ under the License.
           <!-- view and page fields -->
-        <attribute name="viewIndex" type="Integer" mode="INOUT" 
optional="false"/>
-        <attribute name="viewSize" type="Integer" mode="INOUT" 
optional="false"/>
+        <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="showAll" type="String" mode="INOUT" 
optional="true"/>

If is the case, it's exaclty the same reason that I set to default these 
value because are define in hard-code on link that call the findOrder 
from Party component.
I know, I just move the problem ;).

I open an issue to don't forget to close this problem definitively.

Nicolas