click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r996237 - in /click/trunk/click: documentation/xdocs/src/docbook/click/chapter-pages.xml examples/src/org/apache/click/examples/page/ajax/ examples/webapp/ajax/ajax-redirect.htm
Date Sun, 12 Sep 2010 02:27:13 GMT
Author: sabob
Date: Sun Sep 12 02:27:12 2010
New Revision: 996237



Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml
--- click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml (original)
+++ click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml Sun Sep 12 02:27:12
@@ -1050,10 +1050,13 @@ public <token>ActionResult</token> <symb
         and if necessary abort any further processing. If
         <methodname>onSecurityCheck()</methodname> return false, no response
         sent back to the client. Note, if you want to send a specific response to
-        the client or perform a redirect you have to do that from the
+        the client you have to do that from the
         <methodname>onSecurityCheck()</methodname> event, since other Page events
-        are not processed.
-        </para>
+        are not executed. Please see
+        <ulink url="">this</ulink>
+        example for some strategies on implementing
+        <methodname>onSecurityCheck</methodname>  to handle ajax requests.
+            </para>
         <para>Next the target <methodname>page method</methodname> is invoked
         which returns an <classname>ActionResult</classname> that is rendered

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/
Sun Sep 12 02:27:12 2010
@@ -27,10 +27,13 @@ import
- * Provides an <tt>onSecurityCheck</tt> example secure Page for handling Ajax
- * requests. Two links are presented to the user. Clicking on the first link will
- * redirect the user to this page and show an error message. Clicking on the
- * second link will show an error message without redirecting to another page.
+ * Provides an example Page showing how to perform redirects with Ajax requests.
+ *
+ * Since Ajax does not support redirects we return the url to redirect to in a
+ * custom response url called 'REDIRECT_URL'. The client-side then uses JavaScript
+ * to simulate a redirect by setting the value of window.location to the redirect
+ * url.
+ *
 public class AjaxRedirectPage extends BorderPage {

Modified: click/trunk/click/examples/webapp/ajax/ajax-redirect.htm
--- click/trunk/click/examples/webapp/ajax/ajax-redirect.htm (original)
+++ click/trunk/click/examples/webapp/ajax/ajax-redirect.htm Sun Sep 12 02:27:12 2010
@@ -31,8 +31,8 @@ Clicking the link above will send an Aja
 a url to redirect to. The url is returned from the server in a custom response
 header called <tt>'REDIRECT_URL'</tt>.
-Since Ajax does not support redirects, JavaScript is used to navigate the user to
-the given url by setting the <tt>window.location</tt> value to the url.
+Since Ajax does not support redirects, JavaScript is used to simulate a redirect
+by setting the value of <tt>window.location</tt> to the redirect url.
 <script type="text/javascript" src="$context/assets/js/jquery-1.4.2.js"></script>

View raw message