Author: jleroux
Date: Wed Oct 24 07:55:37 2018 New Revision: 1844729 URL: http://svn.apache.org/viewvc?rev=1844729&view=rev Log: Improved: Create an "url-redirect" response type (OFBIZ-10599) As discussed with Dennis in OFBIZ-10569, the idea is to implement an "url-redirect" response type where an external URL can be set with redirected parameters like it's done with request-redirect which is only internal. Thanks: Dennis Balkir Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd?rev=1844729&r1=1844728&r2=1844729&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd (original) +++ ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd Wed Oct 24 07:55:37 2018 @@ -472,6 +472,7 @@ under the License. request-redirect, request-redirect-noparam, url, + url-redirect, cross-redirect </xs:documentation> </xs:annotation> @@ -552,6 +553,13 @@ under the License. </xs:documentation> </xs:annotation> </xs:enumeration> + <xs:enumeration value="url-redirect"> + <xs:annotation> + <xs:documentation> + Works like URL but you can also pass redirected parameters. + </xs:documentation> + </xs:annotation> + </xs:enumeration> <xs:enumeration value="cross-redirect"> <xs:annotation> <xs:documentation> Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java?rev=1844729&r1=1844728&r2=1844729&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java Wed Oct 24 07:55:37 2018 @@ -695,6 +695,10 @@ public class RequestHandler { if ("url".equals(nextRequestResponse.type)) { if (Debug.verboseOn()) Debug.logVerbose("[RequestHandler.doRequest]: Response is a URL redirect." + showSessionId(request), module); callRedirect(nextRequestResponse.value, response, request, ccfg.getStatusCodeString()); + } else if ("url-redirect".equals(nextRequestResponse.type)) { + // check for a cross-application redirect + if (Debug.verboseOn()) Debug.logVerbose("[RequestHandler.doRequest]: Response is a URL redirect with redirect parameters." + showSessionId(request), module); + callRedirect(nextRequestResponse.value + this.makeQueryString(request, nextRequestResponse), response, request, ccfg.getStatusCodeString()); } else if ("cross-redirect".equals(nextRequestResponse.type)) { // check for a cross-application redirect if (Debug.verboseOn()) Debug.logVerbose("[RequestHandler.doRequest]: Response is a Cross-Application redirect." + showSessionId(request), module); |
Free forum by Nabble | Edit this page |