Hi Jinghai,

Not sure we want to uncomment the line

Debug.logInfo("======save last view: " + 
session.getAttribute("_LAST_VIEW_NAME_"));

Any reasons?

Jacques

Le 29/07/2015 11:55, [email protected] a écrit :
Author: shijh
Date: Wed Jul 29 09:55:24 2015
New Revision: 1693231

URL: http://svn.apache.org/r1693231
Log:
OFBIZ-6552.

Add a check on whether viewName is empty to view-last branch. If it's empty, 
try to use the value in the response config if it 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=1693231&r1=1693230&r2=1693231&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 
Wed Jul 29 09:55:24 2015
@@ -612,7 +612,7 @@ public class RequestHandler {
// if the request has the save-last-view attribute set, save it now before the view can be rendered or other chain done so that the _LAST* session attributes will represent the previous request
          if (nextRequestResponse.saveLastView) {
-            // Debug.logInfo("======save last view: " + 
session.getAttribute("_LAST_VIEW_NAME_"));
+            Debug.logInfo("======save last view: " + 
session.getAttribute("_LAST_VIEW_NAME_"), module);
              String lastViewName = (String) 
session.getAttribute("_LAST_VIEW_NAME_");
              // Do not save the view if the last view is the same as the 
current view and saveCurrentView is false
              if (!(!nextRequestResponse.saveCurrentView && 
"view".equals(nextRequestResponse.type) && 
nextRequestResponse.value.equals(lastViewName))) {
@@ -693,6 +693,9 @@ public class RequestHandler {
                  } else if 
(UtilValidate.isNotEmpty(nextRequestResponse.value)) {
                      viewName = nextRequestResponse.value;
                  }
+                if (UtilValidate.isEmpty(viewName) && 
UtilValidate.isNotEmpty(nextRequestResponse.value)) {
+                       viewName = nextRequestResponse.value;
+                }
                  if (urlParams != null) {
                      for (Map.Entry<String, Object> urlParamEntry: 
urlParams.entrySet()) {
                          String key = urlParamEntry.getKey();



Reply via email to