click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r996237 - in /click/trunk/click: documentation/xdocs/src/docbook/click/chapter-pages.xml examples/src/org/apache/click/examples/page/ajax/AjaxRedirectPage.java 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

URL: http://svn.apache.org/viewvc?rev=996237&view=rev
Log:
doco

Modified:
    click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxRedirectPage.java
    click/trunk/click/examples/webapp/ajax/ajax-redirect.htm

Modified: click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml
URL: http://svn.apache.org/viewvc/click/trunk/click/documentation/xdocs/src/docbook/click/chapter-pages.xml?rev=996237&r1=996236&r2=996237&view=diff
==============================================================================
--- 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
2010
@@ -1050,10 +1050,13 @@ public <token>ActionResult</token> <symb
         and if necessary abort any further processing. If
         <methodname>onSecurityCheck()</methodname> return false, no response
is
         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="http://www.avoka.com/click-examples/ajax/ajax-secure.htm">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
to

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxRedirectPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxRedirectPage.java?rev=996237&r1=996236&r2=996237&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxRedirectPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxRedirectPage.java
Sun Sep 12 02:27:12 2010
@@ -27,10 +27,13 @@ import org.apache.click.control.ActionLi
 import org.apache.click.examples.page.BorderPage;
 
 /**
- * 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
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/webapp/ajax/ajax-redirect.htm?rev=996237&r1=996236&r2=996237&view=diff
==============================================================================
--- 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>.
 <p/>
-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>
 



Mime
View raw message