Author: niallp Date: Tue Feb 21 22:17:05 2006 New Revision: 379703 URL: http://svn.apache.org/viewcvs?rev=379703&view=rev Log: re: Bug 38374 - Change RequestProcessor to not throw InvalidCancelException if validate="false" (this makes the RP conform to ComposableRequestProcessor behaviour)
Modified: struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/action/RequestProcessor.java struts/action/branches/STRUTS_1_2_BRANCH/web/examples/exercise/html-cancel.jsp Modified: struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/action/RequestProcessor.java URL: http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/action/RequestProcessor.java?rev=379703&r1=379702&r2=379703&view=diff ============================================================================== --- struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/action/RequestProcessor.java (original) +++ struts/action/branches/STRUTS_1_2_BRANCH/src/share/org/apache/struts/action/RequestProcessor.java Tue Feb 21 22:17:05 2006 @@ -921,6 +921,11 @@ if (form == null) { return (true); } + + // Has validation been turned off for this mapping? + if (!mapping.getValidate()) { + return (true); + } // Was this request cancelled? If it has been, the mapping also // needs to state whether the cancellation is permissable; otherwise @@ -936,11 +941,6 @@ request.removeAttribute(Globals.CANCEL_KEY); throw new InvalidCancelException(); } - } - - // Has validation been turned off for this mapping? - if (!mapping.getValidate()) { - return (true); } // Call the form bean's validation method Modified: struts/action/branches/STRUTS_1_2_BRANCH/web/examples/exercise/html-cancel.jsp URL: http://svn.apache.org/viewcvs/struts/action/branches/STRUTS_1_2_BRANCH/web/examples/exercise/html-cancel.jsp?rev=379703&r1=379702&r2=379703&view=diff ============================================================================== --- struts/action/branches/STRUTS_1_2_BRANCH/web/examples/exercise/html-cancel.jsp (original) +++ struts/action/branches/STRUTS_1_2_BRANCH/web/examples/exercise/html-cancel.jsp Tue Feb 21 22:17:05 2006 @@ -77,12 +77,10 @@ </p> <hr/> - <p><strong>Cancel Not Allowed - Exception (Validate false)</strong></p> + <p><strong>Cancel Ignored (Validate false)</strong></p> <p> - Pressing this Cancel button should throw an - <code>org.apache.struts.action.InvalidCancelException</code> - since Cancellable is not set for this Action even though - the mapping is set to NOT validate. + Pressing this Cancel button should return to the Welcome page, + as validate is set to false for this Action. </p> <p> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]