Author: lektran
Date: Mon Jun 22 23:01:35 2009
New Revision: 787435

URL: http://svn.apache.org/viewvc?rev=787435&view=rev
Log:
Prevent view-last from overwriting the event/error messages of the current event

Modified:
    
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java

Modified: 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=787435&r1=787434&r2=787435&view=diff
==============================================================================
--- 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java 
(original)
+++ 
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java 
Mon Jun 22 23:01:35 2009
@@ -551,7 +551,12 @@
                 }
                 if (urlParams != null) {
                     for (Map.Entry<String, Object> urlParamEntry: 
urlParams.entrySet()) {
-                        request.setAttribute(urlParamEntry.getKey(), 
urlParamEntry.getValue());
+                        String key = (String) 
request.getAttribute(urlParamEntry.getKey());
+                        // Don't overwrite messages coming from the current 
event
+                        if (!("_EVENT_MESSAGE".equals(key) || 
"_ERROR_MESSAGE_".equals(key)
+                                || "_EVENT_MESSAGE_LIST_".equals(key) || 
"_ERROR_MESSAGE_LIST".equals(key))) {
+                            request.setAttribute(urlParamEntry.getKey(), 
urlParamEntry.getValue());
+                        }
                     }
                 }
                 renderView(viewName, requestMap.securityExternalView, request, 
response, null);


Reply via email to