Author: jaz
Date: Mon Jan 5 10:21:48 2009
New Revision: 731642
URL:
http://svn.apache.org/viewvc?rev=731642&view=revLog:
when using :_protect_: only set the error message if one exists
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=731642&r1=731641&r2=731642&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 Jan 5 10:21:48 2009
@@ -224,7 +224,9 @@
throw new EventHandlerException("Pre-Processor event did not return 'success'.");
} else { // protect the view normally rendered and redirect to error response view
returnString = returnString.replace(":_protect_:", "");
- request.setAttribute("_ERROR_MESSAGE_", returnString);
+ if (returnString.length() > 0) {
+ request.setAttribute("_ERROR_MESSAGE_", returnString);
+ }
eventReturnString = "protect";
// check to see if there is an "protect" response, if so it's ok else show the default_error_response_view
if (null == requestManager.getRequestAttribute(requestUri, "protect")) {