click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1052091 - in /click/trunk/click/examples: src/org/apache/click/examples/page/control/ActionDemo.java webapp/control/action-demo.htm
Date Wed, 22 Dec 2010 22:56:52 GMT
Author: sabob
Date: Wed Dec 22 22:56:51 2010
New Revision: 1052091

URL: http://svn.apache.org/viewvc?rev=1052091&view=rev
Log:
Remove auto binding from examples CLK-742

Modified:
    click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java
    click/trunk/click/examples/webapp/control/action-demo.htm

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java?rev=1052091&r1=1052090&r2=1052091&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java
Wed Dec 22 22:56:51 2010
@@ -25,7 +25,6 @@ import org.apache.click.Control;
 import org.apache.click.control.ActionButton;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
-import org.apache.click.util.Bindable;
 
 /**
  * Provides an ActionLink and ActionButton demonstration Page.
@@ -38,17 +37,19 @@ public class ActionDemo extends BorderPa
 
     private static final long serialVersionUID = 1L;
 
-    @Bindable protected ActionLink link = new ActionLink();
-    @Bindable protected ActionButton button = new ActionButton();
-    @Bindable protected String clicked;
+    private ActionLink link = new ActionLink("link");
+    private ActionButton button = new ActionButton("button");
 
     public ActionDemo() {
+        addControl(link);
+        addControl(button);
 
         link.setActionListener(new ActionListener() {
             private static final long serialVersionUID = 1L;
 
             public boolean onAction(Control source) {
-                clicked = source.getClass().getName() + ".onAction invoked at " + (new Date());
+                String msg = source.getClass().getName() + ".onAction invoked at " + (new
Date());
+                addModel("msg", msg);
                 return true;
             }
         });
@@ -59,7 +60,8 @@ public class ActionDemo extends BorderPa
     // --------------------------------------------------------- Event Handlers
 
     public boolean onButtonClick() {
-        clicked = getClass().getName() + ".onButtonClick invoked at " + (new Date());
+        String msg = getClass().getName() + ".onButtonClick invoked at " + (new Date());
+        addModel("msg", msg);
         return true;
     }
 }

Modified: click/trunk/click/examples/webapp/control/action-demo.htm
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/webapp/control/action-demo.htm?rev=1052091&r1=1052090&r2=1052091&view=diff
==============================================================================
--- click/trunk/click/examples/webapp/control/action-demo.htm (original)
+++ click/trunk/click/examples/webapp/control/action-demo.htm Wed Dec 22 22:56:51 2010
@@ -23,6 +23,6 @@ Click $button to invoke <b>ActionButton<
 <p/>
 
 
-#if ($clicked)
-<p class="infoMsg"> $clicked </p>
+#if ($msg)
+<p class="infoMsg"> $msg </p>
 #end



Mime
View raw message