Author: lektran
Date: Thu Jul 23 01:00:58 2009
New Revision: 796918
URL: http://svn.apache.org/viewvc?rev=796918&view=rev
Log:
For view-last responses if no previous view can be found then allow the value
attribute to be used as the default view.
Modified:
ofbiz/trunk/framework/webapp/dtd/site-conf.xsd
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
Modified: ofbiz/trunk/framework/webapp/dtd/site-conf.xsd
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/dtd/site-conf.xsd?rev=796918&r1=796917&r2=796918&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/dtd/site-conf.xsd (original)
+++ ofbiz/trunk/framework/webapp/dtd/site-conf.xsd Thu Jul 23 01:00:58 2009
@@ -249,7 +249,8 @@
<xs:annotation>
<xs:documentation>Will use the view from the last
request unless there
is a saved from some previous request (using
the save-last-view
- attribute).</xs:documentation>
+ attribute). Use the value attribute to
specify a default view
+ in case no previous view can be
retrieved.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="view-home">
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=796918&r1=796917&r2=796918&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
Thu Jul 23 01:00:58 2009
@@ -552,6 +552,8 @@
} else if (session.getAttribute("_LAST_VIEW_NAME_") != null) {
viewName = (String)
session.getAttribute("_LAST_VIEW_NAME_");
urlParams = (Map<String, Object>) UtilGenerics.<String,
Object>checkMap(session.getAttribute("_LAST_VIEW_PARAMS_"));
+ } else if (UtilValidate.isNotEmpty(nextRequestResponse.value))
{
+ viewName = nextRequestResponse.value;
}
if (urlParams != null) {
for (Map.Entry<String, Object> urlParamEntry:
urlParams.entrySet()) {