svn commit: r505761 - in /ofbiz/trunk/applications/party: config/PartyUiLabels.properties src/org/ofbiz/party/party/PartyServices.java webapp/partymgr/party/findparty.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r505761 - in /ofbiz/trunk/applications/party: config/PartyUiLabels.properties src/org/ofbiz/party/party/PartyServices.java webapp/partymgr/party/findparty.ftl

lektran
Author: lektran
Date: Sat Feb 10 12:34:59 2007
New Revision: 505761

URL: http://svn.apache.org/viewvc?view=rev&rev=505761
Log:
Fixed a few problems with the findParty service and it's screen, based on patch from Adrian Crum, OFBIZ-669.

Modified:
    ofbiz/trunk/applications/party/config/PartyUiLabels.properties
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
    ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl

Modified: ofbiz/trunk/applications/party/config/PartyUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/config/PartyUiLabels.properties?view=diff&rev=505761&r1=505760&r2=505761
==============================================================================
--- ofbiz/trunk/applications/party/config/PartyUiLabels.properties (original)
+++ ofbiz/trunk/applications/party/config/PartyUiLabels.properties Sat Feb 10 12:34:59 2007
@@ -352,6 +352,7 @@
 PartyNoContactInformation=No contact information on file.
 PartyNoContent=No Content
 PartyNoMatch=No records match.
+PartyNoNameFound=No name found
 PartyNoNameGroup=No name (group)
 PartyNoNotesForParty=No notes for this party.
 PartyNoParent=No Parent

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?view=diff&rev=505761&r1=505760&r2=505761
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Sat Feb 10 12:34:59 2007
@@ -1105,6 +1105,8 @@
 
                     // add the expr
                     andExprs.add(new EntityExpr("groupName", true, EntityOperator.LIKE, "%"+groupName+"%", true));
+
+                    fieldsToSelect.add("groupName");
                 }
 
                 // ----

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?view=diff&rev=505761&r1=505760&r2=505761
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Sat Feb 10 12:34:59 2007
@@ -270,20 +270,17 @@
                   </td>
                   <td>
                     <div class="tabletext">
-                      <#if partyRow.containsKey("lastName")>
-                        <#if partyRow.lastName?has_content>
+                      <#if partyRow.lastName?has_content>
                           ${partyRow.lastName}<#if partyRow.firstName?has_content>, ${partyRow.firstName}</#if>
-                        <#else>
-                          (${uiLabelMap.PartyNoNameFound})
-                        </#if>
-                      <#elseif partyRow.containsKey("groupName")>
-                        <#if partyRow.groupName?has_content>
+                      <#elseif partyRow.groupName?has_content>
                           ${partyRow.groupName}
-                        <#else>
-                          (${uiLabelMap.PartyNoNameFound})
-                        </#if>
                       <#else>
-                        ${Static["org.ofbiz.party.party.PartyHelper"].getPartyName(partyRow, true)}
+                          <#assign partyName = Static["org.ofbiz.party.party.PartyHelper"].getPartyName(partyRow, true)>
+                          <#if partyName?has_content>
+                              ${partyName}
+                          <#else>
+                              (${uiLabelMap.PartyNoNameFound})
+                          </#if>
                       </#if>
                     </div>
                   </td>