click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1101985 - in /click/trunk/click: documentation/docs/roadmap-changes.html framework/src/org/apache/click/ClickServlet.java
Date Wed, 11 May 2011 17:20:14 GMT
Author: sabob
Date: Wed May 11 17:20:14 2011
New Revision: 1101985

URL: http://svn.apache.org/viewvc?rev=1101985&view=rev
Log:
fixed page action to display error page if error occurs. CLK-767

Modified:
    click/trunk/click/documentation/docs/roadmap-changes.html
    click/trunk/click/framework/src/org/apache/click/ClickServlet.java

Modified: click/trunk/click/documentation/docs/roadmap-changes.html
URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/docs/roadmap-changes.html?rev=1101985&r1=1101984&r2=1101985&view=diff
==============================================================================
--- click/trunk/click/documentation/docs/roadmap-changes.html (original)
+++ click/trunk/click/documentation/docs/roadmap-changes.html Wed May 11 17:20:14 2011
@@ -95,6 +95,10 @@
           [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-757">CLK-757</a>].
           </li>
           <li class="change">
+              Fixed page actions to show error page if error occurs
+          [<a target="_blank" href="https://issues.apache.org/jira/browse/CLK-767">CLK-767</a>].
+          </li>
+          <li class="change">
               Removed AutoCompleteTextField dependency on Page. The Ajax callback
               URL is instead looked up from the request itself. This change removes
               the restriction that AutoCompleteTextField must be attached to the

Modified: click/trunk/click/framework/src/org/apache/click/ClickServlet.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/ClickServlet.java?rev=1101985&r1=1101984&r2=1101985&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/ClickServlet.java (original)
+++ click/trunk/click/framework/src/org/apache/click/ClickServlet.java Wed May 11 17:20:14
2011
@@ -886,10 +886,13 @@ public class ClickServlet extends HttpSe
             renderActionResult(actionResult, page, context);
 
         } else if (page.getPath() != null) {
+
+            boolean errorOccurred = page instanceof ErrorPage;
+
             // Render template unless the request was a page action. This check
             // guards against the scenario where the page action returns null
             // instead of a action result
-            if (context.getRequestParameter(Page.PAGE_ACTION) == null) {
+            if (errorOccurred || context.getRequestParameter(Page.PAGE_ACTION) == null) {
                 String pagePath = page.getPath();
 
                 // Check if request is a JSP page



Mime
View raw message