[ofbiz-framework] branch trunk updated: Fixed: Fixed the issue on party page that will upload the data each time after refreshing the page. (OFBIZ-11325)

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

[ofbiz-framework] branch trunk updated: Fixed: Fixed the issue on party page that will upload the data each time after refreshing the page. (OFBIZ-11325)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6f39741  Fixed: Fixed the issue on party page that will upload the data each time after refreshing the page. (OFBIZ-11325)
6f39741 is described below

commit 6f3974169b8ef15613b213bd0cbfa6426cb38dd8
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sat Jan 25 14:43:04 2020 +0100

    Fixed: Fixed the issue on party page that will upload the data each time after
    refreshing the page.
    (OFBIZ-11325)
   
    Earlier 'view' response type is used on the request that cause the issue.
    We need to use request-redirect response type along with the required
    redirect-parameter instead of view response type, i.e. We need to
    request-redirect on viewProfile along with partyId as redirect-parameter.
   
    Thanks: Humera Khan
---
 .../party/webapp/partymgr/WEB-INF/controller.xml   | 112 +++++++++++++++------
 1 file changed, 84 insertions(+), 28 deletions(-)

diff --git a/applications/party/webapp/partymgr/WEB-INF/controller.xml b/applications/party/webapp/partymgr/WEB-INF/controller.xml
index df0c7de..b8f56de 100644
--- a/applications/party/webapp/partymgr/WEB-INF/controller.xml
+++ b/applications/party/webapp/partymgr/WEB-INF/controller.xml
@@ -112,14 +112,20 @@ under the License.
     <request-map uri="setPartyLink">
         <security https="true" auth="true"/>
         <event type="service" invoke="linkPartyRecord"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
 
     <request-map uri="applyServiceCredit">
         <security https="true" auth="true"/>
         <event type="service" invoke="createServiceCredit"/>
-        <response name="success" type="view" value="viewprofile"/>
-        <response name="error" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
 
     <request-map uri="editcontactmech">
@@ -155,7 +161,9 @@ under the License.
     <request-map uri="createPostalAddress">
         <security https="true" auth="true"/>
         <event type="service" invoke="createPartyPostalAddress"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="error" type="view" value="editcontactmech"/>
     </request-map>
     <request-map uri="updatePostalAddress">
@@ -273,8 +281,12 @@ under the License.
     <request-map uri="restoreCartFromList">
         <security https="true" auth="true"/>
         <event type="java" path="org.apache.ofbiz.order.shoppinglist.ShoppingListEvents" invoke="restoreAutoSaveList"/>
-        <response name="success" type="view" value="viewprofile"/>
-        <response name="error" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
 <!-- End Shoppinglist request mappings -->
 
@@ -282,7 +294,9 @@ under the License.
     <request-map uri="createCreditCard">
         <security https="true" auth="true"/>
         <event type="simple" path="component://accounting/minilang/payment/PaymentMethodEvents.xml" invoke="createCreditCard"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="address" type="view" value="editcontactmech"/>
         <response name="error" type="view" value="editcreditcard"/>
     </request-map>
@@ -297,7 +311,9 @@ under the License.
     <request-map uri="createGiftCard">
         <security https="true" auth="true"/>
         <event type="service" invoke="createGiftCard"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="error" type="view" value="editgiftcard"/>
     </request-map>
     <request-map uri="updateGiftCard">
@@ -344,22 +360,32 @@ under the License.
     <request-map uri="resetAvsOverride">
         <security https="true" auth="true"/>
         <event type="simple" path="component://party/minilang/party/PartySimpleMethods.xml" invoke="deleteAVSOverride"/>
-        <response name="success" type="view" value="viewprofile"/>
-        <response name="error" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
 
     <request-map uri="deletePaymentMethod">
         <security https="true" auth="true"/>
         <event type="simple" path="component://accounting/minilang/payment/PaymentMethodEvents.xml" invoke="deletePaymentMethod"/>
-        <response name="success" type="view" value="viewprofile"/>
-        <response name="error" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
 
     <request-map uri="NewCustomer"><security https="true" auth="true"/><response name="success" type="view" value="NewCustomer"/></request-map>
     <request-map uri="createCustomer">
         <security https="true" auth="true"/>
         <event type="simple" path="component://party/minilang/user/UserEvents.xml" invoke="createCustomer"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="error" type="view" value="NewCustomer"/>
     </request-map>
 
@@ -367,7 +393,9 @@ under the License.
     <request-map uri="createProspect">
         <security https="true" auth="true"/>
         <event type="simple" path="component://party/minilang/user/UserEvents.xml" invoke="createProspect"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="error" type="view" value="NewProspect"/>
     </request-map>
 
@@ -409,7 +437,9 @@ under the License.
     <request-map uri="updatePartyGroup">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="updatePartyGroup"/>
-        <response name="success" type="request" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="error" type="view" value="EditPartyGroup"/>
     </request-map>
 
@@ -440,13 +470,17 @@ under the License.
     <request-map uri="updatePartyAttribute">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="updatePartyAttribute"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="error" type="view" value="EditPartyAttribute"/>
     </request-map>
     <request-map uri="removePartyAttribute">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="removePartyAttribute"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="error" type="view" value="viewprofile"/>
     </request-map>
 
@@ -483,8 +517,12 @@ under the License.
     <request-map uri="createCustRequest">
         <security https="true" auth="true"/>
         <event type="service" invoke="createCustRequest"/>
-        <response name="success" type="request-redirect" value="viewprofile"/>
-        <response name="error" type="request-redirect" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
     <request-map uri="newrequest">
         <security https="true" auth="true"/>
@@ -1017,14 +1055,20 @@ under the License.
     <request-map uri="createPartyCarrierAccount">
         <security auth="true" https="true"/>
         <event type="service" invoke="createPartyCarrierAccount"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="error" type="view" value="editCarrierAccount"/>
     </request-map>
     <request-map uri="updatePartyCarrierAccount">
         <security auth="true" https="true"/>
         <event type="service" invoke="updatePartyCarrierAccount"/>
-        <response name="success" type="view" value="viewprofile"/>
-        <response name="error" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
 
     <request-map uri="EditPartySkills">
@@ -1107,7 +1151,9 @@ under the License.
     <request-map uri="createBillingAccount">
         <security https="true" auth="true"/>
         <event type="service" invoke="createBillingAccount"/>
-        <response name="success" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
         <response name="error" type="view" value="EditBillingAccount"/>
     </request-map>
     <request-map uri="updateBillingAccount">
@@ -1119,8 +1165,12 @@ under the License.
     <request-map uri="deleteBillingAccount">
         <security https="true" auth="true"/>
         <event type="simple" path="component://party/minilang/party/PartySimpleMethods.xml" invoke="deleteBillingAccount"/>
-        <response name="success" type="view" value="viewprofile"/>
-        <response name="error" type="view" value="viewprofile"/>
+        <response name="success" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
 
     <!-- Order communication event requests -->
@@ -1210,7 +1260,9 @@ under the License.
     <request-map uri="PartyFinancialHistory">
          <security https="true" auth="true"/>
          <response name="success" type="view" value="PartyFinancialHistory"/>
-         <response name="error" type="view" value="viewprofile"/>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
 
     <!-- preferences -->
@@ -1229,12 +1281,16 @@ under the License.
     <request-map uri="PartyGeoLocation">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="PartyGeoLocation"/>
-        <response name="error" type="view" value="viewprofile"/>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
     <request-map uri="GetPartyGeoLocation">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="GetPartyGeoLocation"/>
-        <response name="error" type="view" value="viewprofile"/>
+        <response name="error" type="request-redirect" value="viewprofile">
+            <redirect-parameter name="partyId"/>
+        </response>
     </request-map>
     <request-map uri="addGeoLocation">
         <security https="true" auth="true"/>