click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1027862 - in /click/trunk/click/examples/src/org/apache/click/examples/page/ajax: ./ compare/ content/ form/ table/
Date Wed, 27 Oct 2010 09:02:00 GMT
Author: sabob
Date: Wed Oct 27 09:02:00 2010
New Revision: 1027862

URL: http://svn.apache.org/viewvc?rev=1027862&view=rev
Log:
Moved Ajax functionality into AjaxBehavior

Modified:
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxBehaviorPage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxFallbackPage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxRedirectPage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JavascriptAjaxDemoPage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JqueryAjaxDemoPage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/PrototypeAjaxDemoPage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/JsonResponsePage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/XmlResponsePage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/AdvancedFormAjaxPage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/SimpleFormAjaxPage.java
    click/trunk/click/examples/src/org/apache/click/examples/page/ajax/table/TableAjaxPage.java

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxBehaviorPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxBehaviorPage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxBehaviorPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxBehaviorPage.java
Wed Oct 27 09:02:00 2010
@@ -20,7 +20,7 @@ package org.apache.click.examples.page.a
 
 import org.apache.click.Control;
 import org.apache.click.ActionResult;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
 
@@ -46,7 +46,7 @@ public class AjaxBehaviorPage extends Bo
         // Add an Ajax behavior to the link. The behavior will be invoked when the
         // link is clicked. See the basic-ajax-demo.htm template for the client-side
         // Ajax code
-        link.addBehavior(new AjaxBehavior() {
+        link.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxFallbackPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxFallbackPage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxFallbackPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxFallbackPage.java
Wed Oct 27 09:02:00 2010
@@ -21,7 +21,7 @@ package org.apache.click.examples.page.a
 import org.apache.click.ActionListener;
 import org.apache.click.Control;
 import org.apache.click.ActionResult;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
 
@@ -41,7 +41,7 @@ public class AjaxFallbackPage extends Bo
         addControl(link);
 
         // If JavaScript is enabled, the AjaxBehavior will be called
-        link.addBehavior(new AjaxBehavior() {
+        link.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {

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=1027862&r1=1027861&r2=1027862&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
Wed Oct 27 09:02:00 2010
@@ -22,7 +22,7 @@ import java.util.Date;
 import org.apache.click.ActionResult;
 import org.apache.click.Context;
 import org.apache.click.Control;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
 
@@ -46,7 +46,7 @@ public class AjaxRedirectPage extends Bo
         redirectLink.setId("redirectLinkId");
         addControl(redirectLink);
 
-        redirectLink.addBehavior(new AjaxBehavior() {
+        redirectLink.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JavascriptAjaxDemoPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JavascriptAjaxDemoPage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JavascriptAjaxDemoPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JavascriptAjaxDemoPage.java
Wed Oct 27 09:02:00 2010
@@ -20,7 +20,7 @@ package org.apache.click.examples.page.a
 
 import org.apache.click.Control;
 import org.apache.click.ActionResult;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
 
@@ -41,7 +41,7 @@ public class JavascriptAjaxDemoPage exte
         // Add an Ajax behavior to the link. The behavior will be invoked when the
         // link is clicked. See the basic-ajax-demo.htm template for the client-side
         // Ajax code
-        link.addBehavior(new AjaxBehavior() {
+        link.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JqueryAjaxDemoPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JqueryAjaxDemoPage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JqueryAjaxDemoPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/JqueryAjaxDemoPage.java
Wed Oct 27 09:02:00 2010
@@ -20,7 +20,7 @@ package org.apache.click.examples.page.a
 
 import org.apache.click.Control;
 import org.apache.click.ActionResult;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
 
@@ -41,7 +41,7 @@ public class JqueryAjaxDemoPage extends 
         // Add an Ajax behavior to the link. The behavior will be invoked when the
         // link is clicked. See the basic-ajax-demo.htm template for the client-side
         // Ajax code
-        link.addBehavior(new AjaxBehavior() {
+        link.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/PrototypeAjaxDemoPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/PrototypeAjaxDemoPage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/PrototypeAjaxDemoPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/compare/PrototypeAjaxDemoPage.java
Wed Oct 27 09:02:00 2010
@@ -20,7 +20,7 @@ package org.apache.click.examples.page.a
 
 import org.apache.click.Control;
 import org.apache.click.ActionResult;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
 
@@ -41,7 +41,7 @@ public class PrototypeAjaxDemoPage exten
         // Add an Ajax behavior to the link. The behavior will be invoked when the
         // link is clicked. See the basic-ajax-demo.htm template for the client-side
         // Ajax code
-        link.addBehavior(new AjaxBehavior() {
+        link.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/JsonResponsePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/JsonResponsePage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/JsonResponsePage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/JsonResponsePage.java
Wed Oct 27 09:02:00 2010
@@ -20,7 +20,7 @@ package org.apache.click.examples.page.a
 
 import org.apache.click.Control;
 import org.apache.click.ActionResult;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
 
@@ -41,7 +41,7 @@ public class JsonResponsePage extends Bo
         // Add an Ajax behavior to the link. The behavior will be invoked when the
         // link is clicked. See the basic-ajax-demo.htm template for the client-side
         // Ajax code
-        link.addBehavior(new AjaxBehavior() {
+        link.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/XmlResponsePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/XmlResponsePage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/XmlResponsePage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/content/XmlResponsePage.java
Wed Oct 27 09:02:00 2010
@@ -20,7 +20,7 @@ package org.apache.click.examples.page.a
 
 import org.apache.click.Control;
 import org.apache.click.ActionResult;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
 
@@ -41,7 +41,7 @@ public class XmlResponsePage extends Bor
         // Add an Ajax behavior to the link. The behavior will be invoked when the
         // link is clicked. See the basic-ajax-demo.htm template for the client-side
         // Ajax code
-        link.addBehavior(new AjaxBehavior() {
+        link.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/AdvancedFormAjaxPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/AdvancedFormAjaxPage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/AdvancedFormAjaxPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/AdvancedFormAjaxPage.java
Wed Oct 27 09:02:00 2010
@@ -21,9 +21,8 @@ package org.apache.click.examples.page.a
 import java.util.HashMap;
 import java.util.List;
 import org.apache.click.Control;
-import org.apache.click.ControlRegistry;
 import org.apache.click.ActionResult;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.Form;
 import org.apache.click.control.Submit;
 import org.apache.click.control.TextField;
@@ -58,7 +57,7 @@ public class AdvancedFormAjaxPage extend
         form.add(save);
         form.add(cancel);
 
-        save.addBehavior(new AjaxBehavior() {
+        save.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {
@@ -67,7 +66,7 @@ public class AdvancedFormAjaxPage extend
             }
         });
 
-        cancel.addBehavior(new AjaxBehavior() {
+        cancel.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {
@@ -81,7 +80,7 @@ public class AdvancedFormAjaxPage extend
         // NOTE: we add a Behavior to Form so that Click registers the Form as an Ajax target
         // ALSO NOTE: we don't implement the onAction method as the save and cancel Submits
         // handles the Behavior action event
-        form.addBehavior(new AjaxBehavior());
+        form.addBehavior(new DefaultAjaxBehavior());
 
         // Instead of adding a behavior, the same can be achived by explicitly registering
the Form as an Ajax Target:
         // ControlRegistry.registerAjaxTarget(form);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/SimpleFormAjaxPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/SimpleFormAjaxPage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/SimpleFormAjaxPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/form/SimpleFormAjaxPage.java
Wed Oct 27 09:02:00 2010
@@ -22,7 +22,7 @@ import java.util.HashMap;
 import java.util.List;
 import org.apache.click.Control;
 import org.apache.click.ActionResult;
-import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.Field;
 import org.apache.click.control.Form;
 import org.apache.click.control.Submit;
@@ -46,7 +46,7 @@ public class SimpleFormAjaxPage extends 
         form.add(nameFld);
         form.add(saveBtn);
 
-        saveBtn.addBehavior(new AjaxBehavior() {
+        saveBtn.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {
@@ -59,7 +59,7 @@ public class SimpleFormAjaxPage extends 
         // NOTE: we add a Behavior to Form so that Click registers the Form as an Ajax target
         // ALSO NOTE: we don't implement the onAction method as the ok Submit
         // handles the Behavior action event
-        form.addBehavior(new AjaxBehavior());
+        form.addBehavior(new DefaultAjaxBehavior());
 
         // Instead of adding a behavior, the same can be achived by explicitly registering
the Form as an Ajax Target:
         // ControlRegistry.registerAjaxTarget(form);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/table/TableAjaxPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/table/TableAjaxPage.java?rev=1027862&r1=1027861&r2=1027862&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/table/TableAjaxPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/table/TableAjaxPage.java
Wed Oct 27 09:02:00 2010
@@ -24,6 +24,7 @@ import javax.annotation.Resource;
 import org.apache.click.Control;
 import org.apache.click.ActionResult;
 import org.apache.click.ajax.AjaxBehavior;
+import org.apache.click.ajax.DefaultAjaxBehavior;
 import org.apache.click.control.ActionLink;
 import org.apache.click.control.Column;
 import org.apache.click.control.Table;
@@ -56,7 +57,7 @@ public class TableAjaxPage extends Borde
 
     public TableAjaxPage() {
         addControl(editLink);
-        editLink.addBehavior(new AjaxBehavior() {
+        editLink.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {
@@ -66,7 +67,7 @@ public class TableAjaxPage extends Borde
         });
 
         addControl(deleteLink);
-        deleteLink.addBehavior(new AjaxBehavior() {
+        deleteLink.addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {
@@ -75,7 +76,7 @@ public class TableAjaxPage extends Borde
             }
         });
 
-        table.getControlLink().addBehavior(new AjaxBehavior() {
+        table.getControlLink().addBehavior(new DefaultAjaxBehavior() {
 
             @Override
             public ActionResult onAction(Control source) {



Mime
View raw message