You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/06/24 07:00:34 UTC

svn commit: r1750045 - /ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml

Author: jleroux
Date: Fri Jun 24 07:00:34 2016
New Revision: 1750045

URL: http://svn.apache.org/viewvc?rev=1750045&view=rev
Log:
A modified patch from Ankush Upadhyay for "auto-completer does not work to search Contact Party Id" - https://issues.apache.org/jira/browse/OFBIZ-7576

Steps to reproduce:
1. Login to party manager.
2. Search Company party and navigate to profile.
3. Click on create new link of List Related Contacts screenlet.
4. Search any contact party using auto-completer.

Expected behavior: auto-completer should work and return results like lookup does.


jleroux: I use a simple quote (') instead of everywhere in the LookupScreens.xml. Also removes trailing blanks

Modified:
    ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml

Modified: ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml?rev=1750045&r1=1750044&r2=1750045&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml Fri Jun 24 07:00:34 2016
@@ -101,7 +101,7 @@ under the License.
                 <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>
                 <set field="entityName" value="PartyRoleNameDetail"/>
                 <set field="searchFields" value="[partyId, firstName, middleName, lastName, groupName]"/>
-                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition(&quot;roleTypeId&quot;, &quot;CUSTOMER&quot;)}"/>        
+                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'CUSTOMER')}"/>
             </actions>
             <widgets>
                 <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -178,6 +178,10 @@ under the License.
                 <set field="title" value="${uiLabelMap.PartyLookupContact}"/>
                 <set field="entityName" value="PartyRoleAndPartyDetail"/>
                 <set field="parameters.roleTypeId" value="CONTACT"/>
+                <set field="searchFields" value="[partyId, firstName, middleName, lastName]"/>
+                <script location="component://party/groovyScripts/party/StatusCondition.groovy"/>
+                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition([ 
+                    org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'CONTACT')])}"/>
             </actions>
             <widgets>
                 <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
@@ -411,7 +415,7 @@ under the License.
                 <set field="searchFields" value="[partyId, groupName, partyGroupComments]"/>
                 <script location="component://party/groovyScripts/party/StatusCondition.groovy"/>
                 <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition([context.andCondition, 
-                    org.ofbiz.entity.condition.EntityCondition.makeCondition(&quot;roleTypeId&quot;, &quot;INTERNAL_ORGANIZATIO&quot;)])}"/>
+                    org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'INTERNAL_ORGANIZATIO')])}"/>
             </actions>
             <widgets>
                 <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">



Re: svn commit: r1750045 - /ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
+1 for 1 option (yes, I'm lazy). Of course people preferring the std groovy snippet could continue to use it :p

Jacques


Le 24/06/2016 � 09:14, Nicolas Malin a �crit :
> Le 24/06/2016 09:00, jleroux@apache.org a �crit :
>> +                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition([
>> + org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'CONTACT')])}"/>
> This commit is fine and when I read it, I ask myself if a dsl groovy syntax would be define like as example
>
> ${groovy: entity condition make([['roleTypeId' : 'CONTACT']]}
>
> ${groovy: entity condition make([andCondition, ['roleTypeId' : 'CONTACT']]}
>
> ${groovy: entity condition make([andCondition, make ('roleTypeId', NOT_EQUALS,  'CONTACT')]}
>
> It's completly open idea
>
> Nicoals
>


Re: svn commit: r1750045 - /ofbiz/trunk/applications/party/widget/partymgr/LookupScreens.xml

Posted by Nicolas Malin <ni...@nereide.fr>.
Le 24/06/2016 09:00, jleroux@apache.org a �crit :
> +                <set field="andCondition" value="${groovy: return org.ofbiz.entity.condition.EntityCondition.makeCondition([
> +                    org.ofbiz.entity.condition.EntityCondition.makeCondition('roleTypeId', 'CONTACT')])}"/>
This commit is fine and when I read it, I ask myself if a dsl groovy 
syntax would be define like as example

${groovy: entity condition make([['roleTypeId' : 'CONTACT']]}

${groovy: entity condition make([andCondition, ['roleTypeId' : 'CONTACT']]}

${groovy: entity condition make([andCondition, make ('roleTypeId', 
NOT_EQUALS,  'CONTACT')]}

It's completly open idea

Nicoals