Author: lektran
Date: Mon May 28 01:26:00 2007
New Revision: 542149
URL:
http://svn.apache.org/viewvc?view=rev&rev=542149Log:
Applied fix from trunk for revision: 541931
Modified:
ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
Modified: ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?view=diff&rev=542149&r1=542148&r2=542149==============================================================================
--- ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/branches/release4.0/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Mon May 28 01:26:00 2007
@@ -324,22 +324,20 @@
// restore previous redirected request's attribute, so redirected page can display previous request's error msg etc.
String preReqAttStr = (String) request.getSession().getAttribute("_REQ_ATTR_MAP_");
- Map preRequestMap;
if (preReqAttStr != null) {
request.getSession().removeAttribute("_REQ_ATTR_MAP_");
- byte [] reqAttrMapBytes = StringUtil.fromHexString(preReqAttStr);
- preRequestMap = (java.util.Map)org.ofbiz.base.util.UtilObject.getObject(reqAttrMapBytes);
- java.util.Iterator keys= preRequestMap.keySet().iterator();
- while(keys.hasNext()){
- String key = (String) keys.next();
- if("_ERROR_MESSAGE_LIST_".equals(key) ||
- "_ERROR_MESSAGE_MAP_".equals(key) ||
- "_ERROR_MESSAGE_".equals(key) ||
- "_EVENT_MESSAGE_LIST_".equals(key) ||
- "_EVENT_MESSAGE_".equals(key)){
- Object value = preRequestMap.get(key);
- request.setAttribute(key, value);
- }
+ byte[] reqAttrMapBytes = StringUtil.fromHexString(preReqAttStr);
+ Map preRequestMap = (Map) UtilObject.getObject(reqAttrMapBytes);
+ if (preRequestMap != null && preRequestMap.size() > 0) {
+ Iterator keys = preRequestMap.keySet().iterator();
+ while (keys.hasNext()){
+ String key = (String) keys.next();
+ if("_ERROR_MESSAGE_LIST_".equals(key) || "_ERROR_MESSAGE_MAP_".equals(key) || "_ERROR_MESSAGE_".equals(key) ||
+ "_EVENT_MESSAGE_LIST_".equals(key) || "_EVENT_MESSAGE_".equals(key)) {
+ Object value = preRequestMap.get(key);
+ request.setAttribute(key, value);
+ }
+ }
}
}
@@ -381,7 +379,7 @@
} else { // handle views
// first invoke the post-processor events.
Collection postProcEvents = requestManager.getPostProcessor();
- if (postProcEvents != null) {
+ if (chain == null && postProcEvents != null) { // don't run post-proc events on chained requests
Iterator i = postProcEvents.iterator();
while (i.hasNext()) {