click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1052767 - in /click/trunk/click/examples/src/org/apache/click/examples/page/control: CheckListDemo.java EmailForm.java FieldSeparatorDemo.java FieldSetDemo.java FileUpload.java ImageDemo.java
Date Sat, 25 Dec 2010 11:08:22 GMT
Author: sabob
Date: Sat Dec 25 11:08:21 2010
New Revision: 1052767

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

Modified:
    click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java
    click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java
    click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSeparatorDemo.java
    click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java
    click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java
    click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java?rev=1052767&r1=1052766&r2=1052767&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java
Sat Dec 25 11:08:21 2010
@@ -24,7 +24,6 @@ import org.apache.click.examples.page.Bo
 import org.apache.click.examples.page.HomePage;
 import org.apache.click.extras.control.CheckList;
 import org.apache.click.extras.control.PageSubmit;
-import org.apache.click.util.Bindable;
 
 /**
  * Provides CheckList control example.
@@ -50,7 +49,7 @@ public class CheckListDemo extends Borde
         }
     }
 
-    @Bindable protected  Form form = new Form();
+    private Form form = new Form("form");
 
     private CheckList standardCheckList;
     private CheckList sortableCheckList;
@@ -58,6 +57,8 @@ public class CheckListDemo extends Borde
     // Constructor ------------------------------------------------------------
 
     public CheckListDemo() {
+        addControl(form);
+
         form.setFieldStyle("width:20em;");
 
         standardCheckList = new CheckList("standardList", "Standard List ", true);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java?rev=1052767&r1=1052766&r2=1052767&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java Sat
Dec 25 11:08:21 2010
@@ -26,7 +26,6 @@ import org.apache.click.examples.page.Bo
 import org.apache.click.examples.page.HomePage;
 import org.apache.click.extras.control.EmailField;
 import org.apache.click.extras.control.PageSubmit;
-import org.apache.click.util.Bindable;
 
 /**
  * Provides an example page using the custom RichTextArea control.
@@ -37,9 +36,11 @@ public class EmailForm extends BorderPag
 
     private static final long serialVersionUID = 1L;
 
-    @Bindable protected Form form = new Form();
+    private Form form = new Form("form");
 
     public EmailForm() {
+        addControl(form);
+
         form.setLabelsPosition(Form.POSITION_TOP);
         form.setErrorsPosition(Form.POSITION_TOP);
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSeparatorDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSeparatorDemo.java?rev=1052767&r1=1052766&r2=1052767&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSeparatorDemo.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSeparatorDemo.java
Sat Dec 25 11:08:21 2010
@@ -6,7 +6,6 @@ import org.apache.click.examples.page.Bo
 import org.apache.click.examples.page.HomePage;
 import org.apache.click.extras.control.EmailField;
 import org.apache.click.extras.control.PageSubmit;
-import org.apache.click.util.Bindable;
 import org.apache.click.util.ContainerUtils;
 
 /**
@@ -18,8 +17,8 @@ import org.apache.click.util.ContainerUt
 public class FieldSeparatorDemo extends BorderPage {
     private static final long serialVersionUID = 1L;
 
-    @Bindable protected Form newForm = new Form();
-    @Bindable protected Form classicForm = new Form();
+    private Form newForm = new Form("newForm");
+    private Form classicForm = new Form("classicForm");
 
     public FieldSeparatorDemo() {
         // a separator based form
@@ -30,6 +29,9 @@ public class FieldSeparatorDemo extends 
     }
 
     private void makeSeparatorForm() {
+        addControl(newForm);
+        addControl(classicForm);
+
         newForm.setLabelAlign(Form.ALIGN_RIGHT);
         newForm.setButtonAlign(Form.ALIGN_RIGHT);
         FieldSeparator contactSeparator = new FieldSeparator("contactDetails");

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java?rev=1052767&r1=1052766&r2=1052767&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java
Sat Dec 25 11:08:21 2010
@@ -34,7 +34,6 @@ import org.apache.click.extras.control.C
 import org.apache.click.extras.control.DateField;
 import org.apache.click.extras.control.IntegerField;
 import org.apache.click.extras.control.PageSubmit;
-import org.apache.click.util.Bindable;
 import org.apache.click.util.ContainerUtils;
 
 /**
@@ -44,7 +43,7 @@ public class FieldSetDemo extends Border
 
     private static final long serialVersionUID = 1L;
 
-    @Bindable protected Form form = new Form();
+    private Form form = new Form("form");
 
     // Payment options
     private RadioGroup paymentGroup;
@@ -55,6 +54,8 @@ public class FieldSetDemo extends Border
     // Constructor -----------------------------------------------------------
 
     public FieldSetDemo() {
+        addControl(form);
+
         form.setLabelAlign(Form.ALIGN_RIGHT);
         form.setLabelStyle("width:11em;");
         form.setFieldStyle("width:22em;");

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java?rev=1052767&r1=1052766&r2=1052767&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java
Sat Dec 25 11:08:21 2010
@@ -26,7 +26,6 @@ import org.apache.click.control.TextFiel
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.page.HomePage;
 import org.apache.click.extras.control.PageSubmit;
-import org.apache.click.util.Bindable;
 
 /**
  * Provides File Upload example using the FileField control.
@@ -35,7 +34,7 @@ public class FileUpload extends BorderPa
 
     private static final long serialVersionUID = 1L;
 
-    @Bindable protected Form form = new Form();
+    private Form form = new Form("form");
 
     private FileField fileField1;
     private TextField descField1;
@@ -46,6 +45,8 @@ public class FileUpload extends BorderPa
     // Constructor ------------------------------------------------------------
 
     public FileUpload() {
+        addControl(form);
+
         form.setLabelsPosition("top");
 
         FieldSet fieldSet1 = new FieldSet("upload1", "<b>Upload File 1</b>");

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java?rev=1052767&r1=1052766&r2=1052767&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java Sat
Dec 25 11:08:21 2010
@@ -22,7 +22,6 @@ import org.apache.click.control.Form;
 import org.apache.click.control.ImageSubmit;
 import org.apache.click.control.Label;
 import org.apache.click.examples.page.BorderPage;
-import org.apache.click.util.Bindable;
 
 /**
  * Provides an ImageSubmit control example.
@@ -33,12 +32,15 @@ public class ImageDemo extends BorderPag
 
     private ImageSubmit colorSubmit;
 
-    @Bindable protected Form buttonsForm = new Form();
-    @Bindable protected Form form = new Form();
+    private Form buttonsForm = new Form("buttonsForm");
+    private Form form = new Form("form");
 
     // Constructor ------------------------------------------------------------
 
     public ImageDemo() {
+        addControl(form);
+        addControl(buttonsForm);
+
         // Buttons Form
         ImageSubmit editSubmit = new ImageSubmit("edit", "/assets/images/edit.gif");
         editSubmit.setListener(this, "onEditClick");



Mime
View raw message