Author: nmalin
Date: Sun Sep 18 12:41:31 2016
New Revision: 1761323

URL: http://svn.apache.org/viewvc?rev=1761323&view=rev
Log:
Fix for: Adding role for a party show error on the second add 
(OFBIZ-7135)

As a supplement to correct the uri call problem, I review the roleTypeId 
drop-down to list only role without parentTypeId on the main role screen

Thanks: Florian Montalbano this correction.

Modified:
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
    ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=1761323&r1=1761322&r2=1761323&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml 
(original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Sun 
Sep 18 12:41:31 2016
@@ -530,8 +530,8 @@ under the License.
     <request-map uri="addrole">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="createPartyRole"/>
-        <response name="success" type="view" value="viewprofile"/>
-        <response name="error" type="view" value="viewprofile"/>
+        <response name="success" type="view" value="viewroles"/>
+        <response name="error" type="view" value="viewroles"/>
     </request-map>
     <request-map uri="deleterole">
         <security https="true" auth="true"/>

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=1761323&r1=1761322&r2=1761323&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml Sun Sep 18 
12:41:31 2016
@@ -1194,8 +1194,7 @@ under the License.
     </form>
     <form name="ViewPartyRoles" type="list" list-name="partyRoles" 
target="viewroles"
         default-title-style="tableheadtext"
-        odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar"
-       >
+        odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
         <field name="roleTypeId" 
title="${uiLabelMap.PartyRoleTypeId}"><display/></field>
         <field name="description" 
title="${uiLabelMap.PartyRole}"><display/></field>
         <field name="parentTypeId"><display-entity entity-name="RoleType" 
key-field-name="roleTypeId"/></field>
@@ -1206,7 +1205,7 @@ under the License.
             </hyperlink>
         </field>
     </form>
-    <form name="AddPartyRole" type="single" title="Add a role to party" 
target="addrole/viewroles">
+    <form name="AddPartyRole" type="single" title="Add a role to party" 
target="addrole">
         <field name="partyId"><hidden value="${parameters.partyId}"/></field>
         <field name="roleTypeId">
             <drop-down allow-empty="false">
@@ -1217,24 +1216,19 @@ under the License.
         </field>
         <field name="add" title="${uiLabelMap.CommonAdd}"><submit/></field>
     </form>
-    <form name="AddPartyMainRole" type="single" 
title="${uiLabelMap.PartyAddToMainRole}" target="addrole/viewroles">
-        <actions>
-            <entity-condition entity-name="RoleType" list="parentRoleList">
-                <condition-expr field-name="parentTypeId" operator="equals" 
from-field="nullField"/>
-                <order-by field-name="description"/>
-            </entity-condition>                            
-        </actions>
+    <form name="AddPartyMainRole" type="single" 
title="${uiLabelMap.PartyAddToMainRole}" target="addrole">
         <field name="partyId"><hidden value="${parameters.partyId}"/></field>
         <field name="roleTypeId" event="onChange" 
action="ajaxUpdateArea('addPartySecondaryRole', 'addsecondaryroles', 
jQuery('#AddPartyMainRole').serialize());" entry-name="dummy">
             <drop-down allow-empty="false">
                 <entity-options entity-name="RoleType">
+                    <entity-constraint name="parentTypeId" operator="equals" 
env-name="nullField"/>
                     <entity-order-by field-name="description"/>
                 </entity-options>
             </drop-down>
         </field>
         <field name="add" title="${uiLabelMap.CommonAdd}"><submit/></field>
     </form>
-    <form name="AddPartySecondaryRoles" type="single" 
title="${uiLabelMap.PartyAddToSecondRole}" target="addrole/viewroles">
+    <form name="AddPartySecondaryRoles" type="single" 
title="${uiLabelMap.PartyAddToSecondRole}" target="addrole">
         <field name="partyId"><hidden value="${parameters.partyId}"/></field>
         <field name="roleTypeId" entry-name="dummy">
             <drop-down allow-empty="false">


Reply via email to