click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r783339 [1/2] - in /incubator/click/trunk/click/examples: src/org/apache/click/examples/control/ src/org/apache/click/examples/page/ src/org/apache/click/examples/page/ajax/ src/org/apache/click/examples/page/cayenne/ src/org/apache/click/e...
Date Wed, 10 Jun 2009 12:57:16 GMT
Author: medgar
Date: Wed Jun 10 12:57:14 2009
New Revision: 783339

URL: http://svn.apache.org/viewvc?rev=783339&view=rev
Log:
updated examples to use @Bindable annotation

Added:
    incubator/click/trunk/click/examples/src/org/apache/click/examples/util/ExampleUtils.java
Modified:
    incubator/click/trunk/click/examples/src/org/apache/click/examples/control/SimplePanel.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/EditCustomer.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/SourceViewer.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxAccordion.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxCustomer.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxLiveScroller.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxSelect.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AutoCompletePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/AccommodationDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/CayenneFormPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/EnrollmentDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/TabbedCayenneFormPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/LinkDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PickListDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PopulateOnSelect.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/RegexDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SelectDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SubmitLinkDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ContactDetailsPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ExtraControlsForm.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormLayout.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormProperties.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/MultipleFormsDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/SearchForm.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/StandardControlsForm.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/DirectPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/ExceptionPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/FlashPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationA.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationB.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/PageImportsExample.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedTable.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType1Page.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType2Page.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleForm.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleTablePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/CustomerTable.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/EditCustomerPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/HelloWorld.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/MultiPathDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationA.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationB.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/StartPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/panel/FilterPanelDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/panel/ListPanelDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/panel/PanelColumnDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/panel/ReusablePanelDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/panel/SimplePanelDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/panel/TabbedPanelDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/quartz/QuartzJobSchedulerPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/security/Login.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/security/Logout.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/security/Secure.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/EditFormTablePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/EditTable.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/FormTablePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/SearchTablePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/TableDecorator.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/TableFooter.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaginatorPage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaging.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/TableSorting.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/table/TableStyles.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/tree/AdvancedTreePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/tree/CheckboxTreePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/tree/PageLinkTreePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/tree/PlainTreePage.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/velocity/ActionTable.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/velocity/SimpleTable.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/velocity/VelocityMacro.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step2.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step3.java
    incubator/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/WizardPage.java
    incubator/click/trunk/click/examples/webapp/WEB-INF/click.xml
    incubator/click/trunk/click/examples/webapp/WEB-INF/web.xml
    incubator/click/trunk/click/examples/webapp/control/menu-documentation.htm
    incubator/click/trunk/click/examples/webapp/table/table-styles.htm

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/control/SimplePanel.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/control/SimplePanel.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/control/SimplePanel.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/control/SimplePanel.java Wed Jun 10 12:57:14 2009
@@ -44,6 +44,8 @@
  */
 public class SimplePanel extends Panel {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * Default empty constructor.
      */
@@ -71,6 +73,7 @@
      *
      * @param buffer the specified buffer to render the Panel's output to
      */
+    @Override
     public void render(HtmlStringBuffer buffer) {
 
         if (getTemplate() != null) {

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java Wed Jun 10 12:57:14 2009
@@ -20,6 +20,7 @@
 
 import org.apache.click.Page;
 import org.apache.click.extras.control.Menu;
+import org.apache.click.util.Bindable;
 import org.apache.click.util.ClickUtils;
 
 /**
@@ -39,7 +40,7 @@
      * The root menu. Note this transient variable is reinitialized in onInit()
      * to support serialized stateful pages.
      */
-    public transient Menu rootMenu;
+    @Bindable public transient Menu rootMenu;
 
     // ------------------------------------------------------------ Constructor
 
@@ -67,6 +68,7 @@
     /**
      * @see org.apache.click.Page#onInit()
      */
+    @Override
     public void onInit() {
         super.onInit();
 
@@ -84,39 +86,9 @@
      *
      * @see org.apache.click.Page#getTemplate()
      */
+    @Override
     public String getTemplate() {
         return "/border-template.htm";
     }
 
-    // ------------------------------------------------------ Protected Methods
-
-    @SuppressWarnings("unchecked")
-    protected Object getSessionObject(Class aClass) {
-        if (aClass == null) {
-            throw new IllegalArgumentException("Null class parameter.");
-        }
-        Object object = getContext().getSessionAttribute(aClass.getName());
-        if (object == null) {
-            try {
-                object = aClass.newInstance();
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-        return object;
-    }
-
-    protected void setSessionObject(Object object) {
-        if (object != null) {
-            getContext().setSessionAttribute(object.getClass().getName(), object);
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    protected void removeSessionObject(Class aClass) {
-        if (getContext().hasSession() && aClass != null) {
-            getContext().getSession().removeAttribute(aClass.getName());
-        }
-    }
-
 }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/EditCustomer.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/EditCustomer.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/EditCustomer.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/EditCustomer.java Wed Jun 10 12:57:14 2009
@@ -34,6 +34,7 @@
 import org.apache.click.extras.control.DoubleField;
 import org.apache.click.extras.control.EmailField;
 import org.apache.click.extras.control.IntegerField;
+import org.apache.click.util.Bindable;
 import org.springframework.stereotype.Component;
 
 /**
@@ -50,11 +51,11 @@
 public class EditCustomer extends BorderPage {
 
     // Public controls are automatically added to the page
-    public Form form = new Form("form");
-    public HiddenField referrerField = new HiddenField("referrer", String.class);
+    @Bindable public Form form = new Form("form");
+    @Bindable public HiddenField referrerField = new HiddenField("referrer", String.class);
 
     // Public variables can automatically have their value set by request parameters
-    public Integer id;
+    @Bindable public Integer id;
 
     private HiddenField idField = new HiddenField("id", Integer.class);
 
@@ -99,6 +100,7 @@
      *
      * @see Page#onGet()
      */
+    @Override
     public void onGet() {
         if (id != null) {
             Customer customer = customerService.getCustomerForID(id);

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/SourceViewer.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/SourceViewer.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/SourceViewer.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/SourceViewer.java Wed Jun 10 12:57:14 2009
@@ -100,6 +100,7 @@
     /**
      * @see Page#onGet()
      */
+    @Override
     public void onGet() {
         HttpServletRequest request = getContext().getRequest();
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxAccordion.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxAccordion.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxAccordion.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxAccordion.java Wed Jun 10 12:57:14 2009
@@ -33,6 +33,7 @@
  */
 public class AjaxAccordion extends BorderPage {
 
+    @Override
     public List getHeadElements() {
 
         // Lazily load head elements

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxCustomer.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxCustomer.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxCustomer.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxCustomer.java Wed Jun 10 12:57:14 2009
@@ -23,6 +23,7 @@
 import org.apache.click.Page;
 import org.apache.click.examples.domain.Customer;
 import org.apache.click.examples.service.CustomerService;
+import org.apache.click.util.Bindable;
 import org.springframework.stereotype.Component;
 
 /**
@@ -43,7 +44,7 @@
 @Component
 public class AjaxCustomer extends Page {
 
-    public Customer customer;
+    @Bindable public Customer customer;
 
     @Resource(name="customerService")
     private CustomerService customerService;
@@ -53,6 +54,7 @@
      *
      * @see Page#onGet()
      */
+    @Override
     public void onGet() {
         String customerId = getContext().getRequest().getParameter("customerId");
 
@@ -64,6 +66,7 @@
      *
      * @see Page#getContentType()
      */
+    @Override
     public String getContentType() {
         return "text/html; charset=UTF-8";
     }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxLiveScroller.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxLiveScroller.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxLiveScroller.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxLiveScroller.java Wed Jun 10 12:57:14 2009
@@ -44,6 +44,7 @@
     // Specifies the number of customers to retrieve at a time
     private int pageSize = 10;
 
+    @Override
     public void onGet() {
         // Check if the offset parameter was received.
         int offset = NumberUtils.toInt(getContext().getRequest().getParameter("offset"));
@@ -61,6 +62,7 @@
         addModel("customers", customerService.getTopCustomersForPage(offset, pageSize));
     }
 
+    @Override
     public List getHeadElements() {
         // Lazily load head elements and ensure they are only loaded once
         if (headElements == null) {
@@ -81,6 +83,7 @@
         return headElements;
     }
 
+    @Override
     public String getTemplate() {
         // For Ajax requests we want to render the Page template only as there is
         // no need to include the Border template in the response

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxSelect.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxSelect.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxSelect.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxSelect.java Wed Jun 10 12:57:14 2009
@@ -31,6 +31,7 @@
 import org.apache.click.examples.domain.Customer;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.service.CustomerService;
+import org.apache.click.util.Bindable;
 import org.apache.click.util.ClickUtils;
 import org.springframework.stereotype.Component;
 
@@ -42,7 +43,7 @@
 @Component
 public class AjaxSelect extends BorderPage {
 
-    public Select customerSelect = new Select("customerSelect");
+    @Bindable public Select customerSelect = new Select("customerSelect");
 
     @Resource(name="customerService")
     private CustomerService customerService;
@@ -59,6 +60,7 @@
         customerSelect.setSize(customerList.size());
     }
 
+    @Override
     public List getHeadElements() {
         if (headElements == null) {
             headElements = super.getHeadElements();

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AutoCompletePage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AutoCompletePage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AutoCompletePage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AutoCompletePage.java Wed Jun 10 12:57:14 2009
@@ -27,6 +27,7 @@
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.service.PostCodeService;
 import org.apache.click.extras.control.AutoCompleteTextField;
+import org.apache.click.util.Bindable;
 import org.springframework.stereotype.Component;
 
 /**
@@ -37,14 +38,13 @@
 @Component
 public class AutoCompletePage extends BorderPage {
 
-    public Form form = new Form();
+    @Bindable public Form form = new Form();
 
     @Resource(name="postCodeService")
     private PostCodeService postCodeService;
 
     // ------------------------------------------------------------ Constructor
 
-    @SuppressWarnings({"serial", "unchecked"})
     public AutoCompletePage() {
         FieldSet fieldSet = new FieldSet("Enter a Suburb Location");
         fieldSet.setStyle("background-color", "");

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/AccommodationDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/AccommodationDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/AccommodationDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/AccommodationDemo.java Wed Jun 10 12:57:14 2009
@@ -55,6 +55,7 @@
     /**
      * @see FormTablePage#onInit()
      */
+    @Override
     public void onInit() {
         form.add(new TextField("name")).setRequired(true);
 
@@ -88,6 +89,7 @@
     /**
      * @see FormTablePage#getDataObject(Object)
      */
+    @Override
     public DataObject getDataObject(Object id) {
         return studentService.getStudent(id);
     }
@@ -95,6 +97,7 @@
     /**
      * @see FormTablePage#getDataObjectClass()
      */
+    @Override
     public Class getDataObjectClass() {
         return Student.class;
     }
@@ -102,6 +105,7 @@
     /**
      * @see FormTablePage#getRowList()
      */
+    @Override
     public List getRowList() {
         return studentService.getStudentsByHouse();
     }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/CayenneFormPage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/CayenneFormPage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/CayenneFormPage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/CayenneFormPage.java Wed Jun 10 12:57:14 2009
@@ -101,6 +101,7 @@
     /**
      * @see FormTablePage#getDataObject(Object)
      */
+    @Override
     public DataObject getDataObject(Object id) {
         return clientService.getClient(id);
     }
@@ -108,7 +109,7 @@
     /**
      * @see FormTablePage#getDataObjectClass()
      */
-    @SuppressWarnings("unchecked")
+    @Override
     public Class getDataObjectClass() {
         return Client.class;
     }
@@ -116,7 +117,7 @@
     /**
      * @see FormTablePage#getRowList()
      */
-    @SuppressWarnings("unchecked")
+    @Override
     public List getRowList() {
         return clientService.getClients();
     }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/EnrollmentDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/EnrollmentDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/EnrollmentDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/EnrollmentDemo.java Wed Jun 10 12:57:14 2009
@@ -19,9 +19,10 @@
 package org.apache.click.examples.page.cayenne;
 
 import java.util.List;
+
 import javax.annotation.Resource;
-import org.apache.cayenne.DataObject;
 
+import org.apache.cayenne.DataObject;
 import org.apache.click.control.Column;
 import org.apache.click.control.TextField;
 import org.apache.click.examples.domain.Course;
@@ -107,6 +108,7 @@
     /**
      * @see FormTablePage#clear()
      */
+    @Override
     public void clear() {
         pickList.setSelectedValues(null);
         super.clear();
@@ -115,6 +117,7 @@
     /**
      * @see FormTablePage#getDataObject(Object)
      */
+    @Override
     public DataObject getDataObject(Object id) {
         return studentService.getStudent(id);
     }
@@ -122,6 +125,7 @@
     /**
      * @see FormTablePage#getDataObjectClass()
      */
+    @Override
     public Class getDataObjectClass() {
         return Student.class;
     }
@@ -129,6 +133,7 @@
     /**
      * @see FormTablePage#getRowList()
      */
+    @Override
     public List getRowList() {
         return studentService.getStudents();
     }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java Wed Jun 10 12:57:14 2009
@@ -30,6 +30,7 @@
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.extras.cayenne.CayenneForm;
 import org.apache.click.extras.control.LinkDecorator;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides an abstract CayenneForm and Table Page for creating and editing
@@ -46,10 +47,10 @@
  */
 public abstract class FormTablePage extends BorderPage {
 
-    public CayenneForm form;
-    public Table table = new Table();
-    public ActionLink editLink = new ActionLink("edit", this, "onEditClick");
-    public ActionLink removeLink = new ActionLink("remove", this, "onRemoveClick");
+    @Bindable public CayenneForm form;
+    @Bindable public Table table = new Table();
+    @Bindable public ActionLink editLink = new ActionLink("edit", this, "onEditClick");
+    @Bindable public ActionLink removeLink = new ActionLink("remove", this, "onRemoveClick");
 
     // ------------------------------------------------------------ Constructor
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/TabbedCayenneFormPage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/TabbedCayenneFormPage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/TabbedCayenneFormPage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/TabbedCayenneFormPage.java Wed Jun 10 12:57:14 2009
@@ -103,6 +103,7 @@
     /**
      * @see FormTablePage#createForm()
      */
+    @Override
     public CayenneForm createForm() {
         return new TabbedCayenneForm();
     }
@@ -110,6 +111,7 @@
     /**
      * @see FormTablePage#getDataObject(Object)
      */
+    @Override
     public DataObject getDataObject(Object id) {
         return clientService.getClient(id);
     }
@@ -117,7 +119,7 @@
     /**
      * @see FormTablePage#getDataObjectClass()
      */
-    @SuppressWarnings("unchecked")
+    @Override
     public Class getDataObjectClass() {
         return Client.class;
     }
@@ -125,7 +127,7 @@
     /**
      * @see FormTablePage#getRowList()
      */
-    @SuppressWarnings("unchecked")
+       @Override
     public List getRowList() {
         return clientService.getClients();
     }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java Wed Jun 10 12:57:14 2009
@@ -25,6 +25,7 @@
 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.
@@ -37,9 +38,9 @@
  */
 public class ActionDemo extends BorderPage {
 
-    public ActionLink link = new ActionLink();
-    public ActionButton button = new ActionButton();
-    public String clicked;
+    @Bindable public ActionLink link = new ActionLink();
+    @Bindable public ActionButton button = new ActionButton();
+    @Bindable public String clicked;
 
     public ActionDemo() {
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java Wed Jun 10 12:57:14 2009
@@ -24,6 +24,7 @@
 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.
@@ -49,7 +50,7 @@
         }
     }
 
-    public  Form form = new Form();
+    @Bindable public  Form form = new Form();
 
     private CheckList standardCheckList;
     private CheckList sortableCheckList;

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/EmailForm.java Wed Jun 10 12:57:14 2009
@@ -26,6 +26,7 @@
 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.
@@ -36,7 +37,7 @@
  */
 public class EmailForm extends BorderPage {
 
-    public Form form = new Form();
+    @Bindable public Form form = new Form();
 
     public EmailForm() {
         form.setLabelsPosition(Form.POSITION_TOP);

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java Wed Jun 10 12:57:14 2009
@@ -35,6 +35,7 @@
 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.ClickUtils;
 
 /**
@@ -44,7 +45,7 @@
  */
 public class FieldSetDemo extends BorderPage {
 
-    public Form form = new Form();
+    @Bindable public Form form = new Form();
 
     public FieldSetDemo() {
         form.setLabelAlign(Form.ALIGN_RIGHT);

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java Wed Jun 10 12:57:14 2009
@@ -26,6 +26,7 @@
 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.
@@ -34,7 +35,7 @@
  */
 public class FileUpload extends BorderPage {
 
-    public Form form = new Form();
+    @Bindable public Form form = new Form();
 
     private FileField fileField1;
     private TextField descField1;

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java Wed Jun 10 12:57:14 2009
@@ -22,6 +22,7 @@
 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.
@@ -32,8 +33,8 @@
 
     private ImageSubmit colorSubmit;
 
-    public Form buttonsForm = new Form();
-    public Form form = new Form();
+    @Bindable public Form buttonsForm = new Form();
+    @Bindable public Form form = new Form();
 
     public ImageDemo() {
         // Buttons Form

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/LinkDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/LinkDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/LinkDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/LinkDemo.java Wed Jun 10 12:57:14 2009
@@ -26,6 +26,7 @@
 import org.apache.click.examples.page.HomePage;
 import org.apache.click.extras.control.ExternalLink;
 import org.apache.click.extras.control.PageButton;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides an ActionLink, ExternalLink and PageLink control examples Page.
@@ -34,12 +35,12 @@
  */
 public class LinkDemo extends BorderPage {
 
-    public ActionLink actionLink = new ActionLink("ActionLink", this, "onLinkClick");
-    public ExternalLink externalLink = new ExternalLink("ExternalLink", "http://www.google.com/search");
-    public PageLink pageLink = new PageLink("PageLink", HomePage.class);
-    public PageButton pageButton = new PageButton("PageButton", HomePage.class);
+    @Bindable public ActionLink actionLink = new ActionLink("ActionLink", this, "onLinkClick");
+    @Bindable public ExternalLink externalLink = new ExternalLink("ExternalLink", "http://www.google.com/search");
+    @Bindable public PageLink pageLink = new PageLink("PageLink", HomePage.class);
+    @Bindable public PageButton pageButton = new PageButton("PageButton", HomePage.class);
 
-    public String clicked;
+    @Bindable public String clicked;
 
     public LinkDemo() {
         externalLink.setParameter("q", "Click Framework");

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PickListDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PickListDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PickListDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PickListDemo.java Wed Jun 10 12:57:14 2009
@@ -25,6 +25,7 @@
 import org.apache.click.control.Submit;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.extras.control.PickList;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides an Select example Page.
@@ -33,8 +34,8 @@
  */
 public class PickListDemo extends BorderPage {
 
-    public Form form = new Form();
-    public List selectedValues;
+    @Bindable public Form form = new Form();
+    @Bindable public List selectedValues;
 
     private PickList pickList = new PickList("languages");
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PopulateOnSelect.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PopulateOnSelect.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PopulateOnSelect.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/PopulateOnSelect.java Wed Jun 10 12:57:14 2009
@@ -25,6 +25,7 @@
 import org.apache.click.control.Select;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.extras.control.TabbedForm;
+import org.apache.click.util.Bindable;
 import org.apache.commons.lang.StringUtils;
 
 public class PopulateOnSelect extends BorderPage {
@@ -34,7 +35,7 @@
     private static final String GAUTENG_PROVINCE = "GP";
     private static final String WESTERN_CAPE = "WC";
 
-    public TabbedForm form = new TabbedForm("form");
+    @Bindable public TabbedForm form = new TabbedForm("form");
 
     private Select state = new Select("state");
     private Select city = new Select("city");
@@ -96,6 +97,7 @@
         populateSuburbData(city.getValue());
     }
 
+    @Override
     public String getHtmlImports() {
         Map model = new HashMap();
         model.put("stateId", state.getId());

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/RegexDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/RegexDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/RegexDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/RegexDemo.java Wed Jun 10 12:57:14 2009
@@ -24,6 +24,7 @@
 import org.apache.click.examples.page.HomePage;
 import org.apache.click.extras.control.PageSubmit;
 import org.apache.click.extras.control.RegexField;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides a form RegexField example.
@@ -32,7 +33,7 @@
  */
 public class RegexDemo extends BorderPage {
 
-    public Form form = new Form();
+    @Bindable public Form form = new Form();
 
     public RegexDemo() {
         RegexField versionField = new RegexField("version", "Version", 10);

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SelectDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SelectDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SelectDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SelectDemo.java Wed Jun 10 12:57:14 2009
@@ -30,6 +30,7 @@
 import org.apache.click.examples.page.HomePage;
 import org.apache.click.extras.control.CountrySelect;
 import org.apache.click.extras.control.PageSubmit;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides an Select example Page.
@@ -38,7 +39,7 @@
  */
 public class SelectDemo extends BorderPage {
 
-    public Form form = new Form();
+    @Bindable public Form form = new Form();
 
     private Select genderSelect;
     private Select investmentSelect;
@@ -98,6 +99,7 @@
     /**
      * @see org.apache.click.Page#onPost()
      */
+    @Override
     public void onPost() {
         if (form.isValid()) {
             addModel("gender", genderSelect.getValue());

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SubmitLinkDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SubmitLinkDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SubmitLinkDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/control/SubmitLinkDemo.java Wed Jun 10 12:57:14 2009
@@ -1,162 +1,163 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.click.examples.page.control;
-
-import java.util.Date;
-
-import org.apache.click.ActionListener;
-import org.apache.click.Control;
-import org.apache.click.control.FieldSet;
-import org.apache.click.control.Form;
-import org.apache.click.control.TextField;
-import org.apache.click.examples.page.BorderPage;
-import org.apache.click.extras.control.SubmitLink;
-
-/**
- * This example demonstrates how to use a SubmitLink control together with the
- * Form control.
- *
- * @author Bob Schellink
- */
-public class SubmitLinkDemo extends BorderPage {
-
-    public String demo1Msg;
-
-    public String demo2Msg;
-
-    public String demo3Msg;
-
-    public String demo4Msg;
-
-    public SubmitLinkDemo() {
-        demo1();
-
-        demo2();
-
-        demo3();
-
-        demo4();
-    }
-
-    public void demo1() {
-        // Create a submit link.
-        final SubmitLink submitLink = new SubmitLink("submit");
-
-        Form form = new Form("demo1");
-        addControl(form);
-
-        FieldSet fieldSet = new FieldSet("fieldSet");
-        form.add(fieldSet);
-
-        fieldSet.add(new TextField("name"));
-
-        // Add the submit link to the fieldSet
-        fieldSet.add(submitLink);
-
-        // The SubmitLink action listener
-        submitLink.setActionListener(new ActionListener() {
-
-            public boolean onAction(Control source) {
-                demo1Msg = submitLink.getName() + ".onAction invoked at "
-                    + (new Date());
-                return true;
-            }
-        });
-    }
-
-    public void demo2() {
-        // Create a submit link which includes parameters.
-        final SubmitLink paramLink = new SubmitLink("paramLink");
-
-        Form form = new Form("demo2");
-        addControl(form);
-
-        FieldSet fieldSet = new FieldSet("fieldSet");
-        form.add(fieldSet);
-
-        fieldSet.add(new TextField("name"));
-
-        // Add some parameters to the parameterized submit link
-        paramLink.setValue("myValue");
-        paramLink.setParameter("x", "100");
-
-        // Add the parameterized submit link to the FieldSet
-        fieldSet.add(paramLink);
-
-        // The Parameterized SubmitLink action listener
-        paramLink.setActionListener(new ActionListener() {
-
-            public boolean onAction(Control source) {
-                demo2Msg = paramLink.getName() + ".onAction invoked at "
-                    + (new Date());
-                demo2Msg += "<br>Parameters:" + paramLink.getParameters();
-                return true;
-            }
-        });
-    }
-
-    public void demo3() {
-        // Create a standalone submit link.
-        final SubmitLink standaloneLink = new SubmitLink("standaloneLink");
-
-        // Add the Standalone SubmitLink to the Page
-        addControl(standaloneLink);
-
-        // The Standalone SubmitLink action listener
-        standaloneLink.setActionListener(new ActionListener() {
-
-            public boolean onAction(Control source) {
-                demo3Msg = source.getName() + ".onAction invoked at " +
-                    (new Date());
-                return true;
-            }
-        });
-    }
-
-    public void demo4() {
-        // Create a submit link
-        final SubmitLink confirmationLink = new SubmitLink("confirmationLink");
-
-        Form form = new Form("demo4");
-        addControl(form);
-
-        FieldSet fieldSet = new FieldSet("fieldSet");
-        form.add(fieldSet);
-
-        fieldSet.add(new TextField("name"));
-
-        // Add the submit link to the FieldSet
-        fieldSet.add(confirmationLink);
-
-        // Set custom JavaScript for the onclick event. The confirmSubmit function
-        // is defined in the page template -> submit-link-demo.htm
-        String clickEvent = "return confirmSubmit(this, '" + form.getName() + "', 'Are you sure?');";
-        confirmationLink.setOnClick(clickEvent);
-
-        // The Parameterized SubmitLink action listener
-        confirmationLink.setActionListener(new ActionListener() {
-
-            public boolean onAction(Control source) {
-                demo4Msg = confirmationLink.getName() + ".onAction invoked at "
-                    + (new Date());
-                return true;
-            }
-        });
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.click.examples.page.control;
+
+import java.util.Date;
+
+import org.apache.click.ActionListener;
+import org.apache.click.Control;
+import org.apache.click.control.FieldSet;
+import org.apache.click.control.Form;
+import org.apache.click.control.TextField;
+import org.apache.click.examples.page.BorderPage;
+import org.apache.click.extras.control.SubmitLink;
+import org.apache.click.util.Bindable;
+
+/**
+ * This example demonstrates how to use a SubmitLink control together with the
+ * Form control.
+ *
+ * @author Bob Schellink
+ */
+public class SubmitLinkDemo extends BorderPage {
+
+    @Bindable public String demo1Msg;
+
+    @Bindable public String demo2Msg;
+
+    @Bindable public String demo3Msg;
+
+    @Bindable public String demo4Msg;
+
+    public SubmitLinkDemo() {
+        demo1();
+
+        demo2();
+
+        demo3();
+
+        demo4();
+    }
+
+    public void demo1() {
+        // Create a submit link.
+        final SubmitLink submitLink = new SubmitLink("submit");
+
+        Form form = new Form("demo1");
+        addControl(form);
+
+        FieldSet fieldSet = new FieldSet("fieldSet");
+        form.add(fieldSet);
+
+        fieldSet.add(new TextField("name"));
+
+        // Add the submit link to the fieldSet
+        fieldSet.add(submitLink);
+
+        // The SubmitLink action listener
+        submitLink.setActionListener(new ActionListener() {
+
+            public boolean onAction(Control source) {
+                demo1Msg = submitLink.getName() + ".onAction invoked at "
+                    + (new Date());
+                return true;
+            }
+        });
+    }
+
+    public void demo2() {
+        // Create a submit link which includes parameters.
+        final SubmitLink paramLink = new SubmitLink("paramLink");
+
+        Form form = new Form("demo2");
+        addControl(form);
+
+        FieldSet fieldSet = new FieldSet("fieldSet");
+        form.add(fieldSet);
+
+        fieldSet.add(new TextField("name"));
+
+        // Add some parameters to the parameterized submit link
+        paramLink.setValue("myValue");
+        paramLink.setParameter("x", "100");
+
+        // Add the parameterized submit link to the FieldSet
+        fieldSet.add(paramLink);
+
+        // The Parameterized SubmitLink action listener
+        paramLink.setActionListener(new ActionListener() {
+
+            public boolean onAction(Control source) {
+                demo2Msg = paramLink.getName() + ".onAction invoked at "
+                    + (new Date());
+                demo2Msg += "<br>Parameters:" + paramLink.getParameters();
+                return true;
+            }
+        });
+    }
+
+    public void demo3() {
+        // Create a standalone submit link.
+        final SubmitLink standaloneLink = new SubmitLink("standaloneLink");
+
+        // Add the Standalone SubmitLink to the Page
+        addControl(standaloneLink);
+
+        // The Standalone SubmitLink action listener
+        standaloneLink.setActionListener(new ActionListener() {
+
+            public boolean onAction(Control source) {
+                demo3Msg = source.getName() + ".onAction invoked at " +
+                    (new Date());
+                return true;
+            }
+        });
+    }
+
+    public void demo4() {
+        // Create a submit link
+        final SubmitLink confirmationLink = new SubmitLink("confirmationLink");
+
+        Form form = new Form("demo4");
+        addControl(form);
+
+        FieldSet fieldSet = new FieldSet("fieldSet");
+        form.add(fieldSet);
+
+        fieldSet.add(new TextField("name"));
+
+        // Add the submit link to the FieldSet
+        fieldSet.add(confirmationLink);
+
+        // Set custom JavaScript for the onclick event. The confirmSubmit function
+        // is defined in the page template -> submit-link-demo.htm
+        String clickEvent = "return confirmSubmit(this, '" + form.getName() + "', 'Are you sure?');";
+        confirmationLink.setOnClick(clickEvent);
+
+        // The Parameterized SubmitLink action listener
+        confirmationLink.setActionListener(new ActionListener() {
+
+            public boolean onAction(Control source) {
+                demo4Msg = confirmationLink.getName() + ".onAction invoked at "
+                    + (new Date());
+                return true;
+            }
+        });
+    }
+}

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ContactDetailsPage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ContactDetailsPage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ContactDetailsPage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ContactDetailsPage.java Wed Jun 10 12:57:14 2009
@@ -42,6 +42,7 @@
 
     private CssForm form;
 
+    @Override
     public void onInit() {
         // Ensure the super implementation executes
         super.onInit();

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ExtraControlsForm.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ExtraControlsForm.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ExtraControlsForm.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/ExtraControlsForm.java Wed Jun 10 12:57:14 2009
@@ -32,6 +32,7 @@
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.page.HomePage;
 import org.apache.click.examples.service.CustomerService;
+import org.apache.click.examples.util.ExampleUtils;
 import org.apache.click.extras.control.CheckList;
 import org.apache.click.extras.control.ColorPicker;
 import org.apache.click.extras.control.CountrySelect;
@@ -46,6 +47,7 @@
 import org.apache.click.extras.control.RegexField;
 import org.apache.click.extras.control.TelephoneField;
 import org.apache.click.extras.control.VirtualKeyboard;
+import org.apache.click.util.Bindable;
 import org.apache.click.util.ClickUtils;
 import org.springframework.stereotype.Component;
 
@@ -64,8 +66,8 @@
         boolean javaScriptValidate = false;
     }
 
-    public Form form = new Form();
-    public Form optionsForm = new Form();
+    @Bindable public Form form = new Form();
+    @Bindable public Form optionsForm = new Form();
 
     private CheckList checkList = new CheckList("checkList");
     private Checkbox allFieldsRequired = new Checkbox("allFieldsRequired");
@@ -126,7 +128,7 @@
         Options options = new Options();
         options.allFieldsRequired = allFieldsRequired.isChecked();
         options.javaScriptValidate = jsValidate.isChecked();
-        setSessionObject(options);
+        ExampleUtils.setSessionObject(options);
         applyOptions();
         return true;
     }
@@ -134,7 +136,7 @@
     // -------------------------------------------------------- Private Methods
 
     private void applyOptions() {
-        Options options = (Options) getSessionObject(Options.class);
+        Options options = (Options) ExampleUtils.getSessionObject(Options.class);
 
         form.setJavaScriptValidation(options.javaScriptValidate);
         List formFiels = ClickUtils.getFormFields(form);

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormLayout.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormLayout.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormLayout.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormLayout.java Wed Jun 10 12:57:14 2009
@@ -22,7 +22,6 @@
 import org.apache.click.control.FieldSet;
 import org.apache.click.control.Form;
 import org.apache.click.control.Label;
-import org.apache.click.control.Reset;
 import org.apache.click.control.Submit;
 import org.apache.click.control.TextArea;
 import org.apache.click.control.TextField;
@@ -31,6 +30,7 @@
 import org.apache.click.extras.control.EmailField;
 import org.apache.click.extras.control.PageSubmit;
 import org.apache.click.extras.control.TelephoneField;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides Form layout examples using the Form and FieldSet controls.
@@ -39,8 +39,8 @@
  */
 public class FormLayout extends BorderPage {
 
-    public Form form1 = new Form();
-    public Form form2 = new Form();
+    @Bindable public Form form1 = new Form();
+    @Bindable public Form form2 = new Form();
 
     public FormLayout() {
         // ------

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormProperties.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormProperties.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormProperties.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormProperties.java Wed Jun 10 12:57:14 2009
@@ -31,6 +31,7 @@
 import org.apache.click.examples.control.InvestmentSelect;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.page.HomePage;
+import org.apache.click.examples.util.ExampleUtils;
 import org.apache.click.extras.control.DateField;
 import org.apache.click.extras.control.EmailField;
 import org.apache.click.extras.control.PageSubmit;
@@ -234,23 +235,24 @@
     /**
      * @see org.apache.click.Page#onInit()
      */
+    @Override
     public void onInit() {
         super.onInit();
 
         // Apply saved options to the demo form and the optionsForm
-        Options options = (Options) getSessionObject(Options.class);
+        Options options = (Options) ExampleUtils.getSessionObject(Options.class);
         applyOptions(options);
     }
 
     public boolean onOkClick() {
-        Values values = (Values) getSessionObject(Values.class);
+        Values values = (Values) ExampleUtils.getSessionObject(Values.class);
 
         values.name = nameField.getValue();
         values.email = emailField.getValue();
         values.investments = investmentsField.getValue();
         values.dateJoined = dateJoinedField.getValue();
 
-        setSessionObject(values);
+        ExampleUtils.setSessionObject(values);
 
         return true;
     }
@@ -276,10 +278,10 @@
 
         applyOptions(options);
 
-        setSessionObject(options);
+        ExampleUtils.setSessionObject(options);
 
         // Apply any saved form values to demo form.
-        Values values = (Values) getSessionObject(Values.class);
+        Values values = (Values) ExampleUtils.getSessionObject(Values.class);
 
         nameField.setValue(values.name);
         emailField.setValue(values.email);
@@ -290,8 +292,8 @@
     }
 
     public boolean onRestoreDefaults() {
-        removeSessionObject(Options.class);
-        removeSessionObject(Values.class);
+        ExampleUtils.removeSessionObject(Options.class);
+        ExampleUtils.removeSessionObject(Values.class);
 
         applyOptions(new Options());
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/MultipleFormsDemo.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/MultipleFormsDemo.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/MultipleFormsDemo.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/MultipleFormsDemo.java Wed Jun 10 12:57:14 2009
@@ -39,6 +39,7 @@
     /**
      * @see org.apache.click.Page#onSecurityCheck()
      */
+    @Override
     public boolean onSecurityCheck() {
         String pagePath = getContext().getPagePath(getClass());
 
@@ -65,6 +66,7 @@
     /**
      * @see org.apache.click.Page#onInit()
      */
+    @Override
     public void onInit() {
         super.onInit();
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/SearchForm.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/SearchForm.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/SearchForm.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/SearchForm.java Wed Jun 10 12:57:14 2009
@@ -29,6 +29,7 @@
 import org.apache.click.examples.domain.Customer;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.service.CustomerService;
+import org.apache.click.util.Bindable;
 import org.springframework.stereotype.Component;
 
 /**
@@ -40,7 +41,7 @@
 @Component
 public class SearchForm extends BorderPage {
 
-    public Form form = new Form();
+    @Bindable public Form form = new Form();
 
     private TextField textField;
     private Select typeSelect;
@@ -93,4 +94,5 @@
             addModel("message", "Customer not found");
         }
     }
+
 }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/StandardControlsForm.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/StandardControlsForm.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/StandardControlsForm.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/form/StandardControlsForm.java Wed Jun 10 12:57:14 2009
@@ -45,6 +45,8 @@
 import org.apache.click.examples.domain.Customer;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.service.CustomerService;
+import org.apache.click.examples.util.ExampleUtils;
+import org.apache.click.util.Bindable;
 import org.apache.click.util.ClickUtils;
 import org.springframework.stereotype.Component;
 
@@ -63,8 +65,8 @@
         boolean javaScriptValidate = false;
     }
 
-    public Form form = new Form();
-    public Form optionsForm = new Form();
+    @Bindable public Form form = new Form();
+    @Bindable public Form optionsForm = new Form();
 
     private Select select = new Select("select");
     private Checkbox allFieldsRequired = new Checkbox("allFieldsRequired");
@@ -136,7 +138,7 @@
         Options options = new Options();
         options.allFieldsRequired = allFieldsRequired.isChecked();
         options.javaScriptValidate = jsValidate.isChecked();
-        setSessionObject(options);
+        ExampleUtils.setSessionObject(options);
         applyOptions();
         return true;
     }
@@ -144,7 +146,7 @@
     // -------------------------------------------------------- Private Methods
 
     private void applyOptions() {
-        Options options = (Options) getSessionObject(Options.class);
+        Options options = (Options) ExampleUtils.getSessionObject(Options.class);
 
         form.setJavaScriptValidation(options.javaScriptValidate);
         List formFiels = ClickUtils.getFormFields(form);

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/DirectPage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/DirectPage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/DirectPage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/DirectPage.java Wed Jun 10 12:57:14 2009
@@ -42,6 +42,7 @@
      *
      * @see Page#onGet()
      */
+    @Override
     public void onGet() {
         String filename = getClass().getName().replace('.', '/');
         filename = "/WEB-INF/classes/" + filename + ".java";
@@ -69,21 +70,16 @@
                 line = reader.readLine();
             }
 
+            // Set page path to null to signal to ClickServlet that rendering
+            // has been completed
+            setPath(null);
+
         } catch (IOException ioe) {
-            ioe.printStackTrace();
+            throw new RuntimeException(ioe);
 
         } finally {
             ClickUtils.close(inputStream);
         }
     }
 
-    /**
-     * Return null to specify no further rendering required.
-     *
-     * @see Page#getPath()
-     */
-    public String getPath() {
-        return null;
-    }
-
 }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/ExceptionPage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/ExceptionPage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/ExceptionPage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/ExceptionPage.java Wed Jun 10 12:57:14 2009
@@ -21,6 +21,7 @@
 import org.apache.click.Page;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides examples of the Click Exception handling.
@@ -29,12 +30,12 @@
  */
 public class ExceptionPage extends BorderPage {
 
-    public ActionLink nullPointerLink = new ActionLink(this, "onNullPointerClick");
-    public ActionLink illegalArgumentLink = new ActionLink(this, "onIllegalArgumentExceptionClick");
-    public ActionLink missingMethodLink = new ActionLink(this, "onMissingMethodClick");
-    public ActionLink brokenRendererLink = new ActionLink(this, "onBrokenRendererClick");
-    public ActionLink brokenBorderLink = new ActionLink(this, "onBrokenBorderClick");
-    public ActionLink brokenContentLink = new ActionLink(this, "onBrokenContentClick");
+    @Bindable public ActionLink nullPointerLink = new ActionLink(this, "onNullPointerClick");
+    @Bindable public ActionLink illegalArgumentLink = new ActionLink(this, "onIllegalArgumentExceptionClick");
+    @Bindable public ActionLink missingMethodLink = new ActionLink(this, "onMissingMethodClick");
+    @Bindable public ActionLink brokenRendererLink = new ActionLink(this, "onBrokenRendererClick");
+    @Bindable public ActionLink brokenBorderLink = new ActionLink(this, "onBrokenBorderClick");
+    @Bindable public ActionLink brokenContentLink = new ActionLink(this, "onBrokenContentClick");
 
     private String template;
 
@@ -71,6 +72,7 @@
      *
      * @see Page#getTemplate()
      */
+    @Override
     public String getTemplate() {
         return (template != null) ? template : super.getTemplate();
     }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/FlashPage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/FlashPage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/FlashPage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/FlashPage.java Wed Jun 10 12:57:14 2009
@@ -23,6 +23,7 @@
 import org.apache.click.control.TextField;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.page.HomePage;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides an example of a flash session attribute.
@@ -31,7 +32,7 @@
  */
 public class FlashPage extends BorderPage {
 
-    public Form form = new Form();
+    @Bindable public Form form = new Form();
 
     private TextField valueField = new TextField("value", "Value:", true);
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationA.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationA.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationA.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationA.java Wed Jun 10 12:57:14 2009
@@ -20,6 +20,7 @@
 
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides an navigation example Page demonstrating forward and redirect
@@ -29,16 +30,17 @@
  */
 public class NavigationA extends BorderPage {
 
-    public ActionLink forwardLink = new ActionLink("forwardLink", this, "onForwardClick");
-    public ActionLink forwardParamLink = new ActionLink("forwardParamLink", this, "onForwardParamClick");
-    public ActionLink redirectLink = new ActionLink("redirectLink", this, "onRedirectClick");
-    public ActionLink redirectParamLink = new ActionLink("redirectParamLink", this, "onRedirectParamClick");
+    @Bindable public ActionLink forwardLink = new ActionLink("forwardLink", this, "onForwardClick");
+    @Bindable public ActionLink forwardParamLink = new ActionLink("forwardParamLink", this, "onForwardParamClick");
+    @Bindable public ActionLink redirectLink = new ActionLink("redirectLink", this, "onRedirectClick");
+    @Bindable public ActionLink redirectParamLink = new ActionLink("redirectParamLink", this, "onRedirectParamClick");
 
     // --------------------------------------------------------- Event Handlers
 
     /**
      * @see org.apache.click.Page#onInit()
      */
+    @Override
     public void onInit() {
         super.onInit();
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationB.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationB.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationB.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationB.java Wed Jun 10 12:57:14 2009
@@ -26,6 +26,7 @@
  */
 public class NavigationB extends NavigationA {
 
+    @Override
     public String getTarget() {
         return "/general/navigation-a.htm";
     }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/PageImportsExample.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/PageImportsExample.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/PageImportsExample.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/general/PageImportsExample.java Wed Jun 10 12:57:14 2009
@@ -34,6 +34,7 @@
      *
      * @see org.apache.click.Page#getPageImports()
      */
+    @Override
     public PageImports getPageImports() {
         PageImports pageImports = super.getPageImports();
 
@@ -48,6 +49,7 @@
     /**
      * @see org.apache.click.Page#getTemplate()
      */
+    @Override
     public String getTemplate() {
         return getPath();
     }

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java Wed Jun 10 12:57:14 2009
@@ -34,6 +34,7 @@
 import org.apache.click.examples.service.CustomerService;
 import org.apache.click.extras.control.DateField;
 import org.apache.click.extras.control.EmailField;
+import org.apache.click.util.Bindable;
 import org.springframework.stereotype.Component;
 
 /**
@@ -44,8 +45,8 @@
 @Component
 public class AdvancedForm extends BorderPage {
 
-    public Form form = new Form();
-    public String msg;
+    @Bindable public Form form = new Form();
+    @Bindable public String msg;
 
     private Select investmentSelect = new Select("investment");
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedTable.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedTable.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedTable.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedTable.java Wed Jun 10 12:57:14 2009
@@ -32,6 +32,7 @@
 import org.apache.click.examples.page.EditCustomer;
 import org.apache.click.examples.service.CustomerService;
 import org.apache.click.extras.control.LinkDecorator;
+import org.apache.click.util.Bindable;
 import org.springframework.stereotype.Component;
 
 /**
@@ -42,9 +43,9 @@
 @Component
 public class AdvancedTable extends BorderPage {
 
-    public Table table = new Table();
-    public PageLink editLink = new PageLink("Edit", EditCustomer.class);
-    public ActionLink deleteLink = new ActionLink("Delete", this, "onDeleteClick");
+    @Bindable public Table table = new Table();
+    @Bindable public PageLink editLink = new PageLink("Edit", EditCustomer.class);
+    @Bindable public ActionLink deleteLink = new ActionLink("Delete", this, "onDeleteClick");
 
     @Resource(name="customerService")
     private CustomerService customerService;
@@ -95,6 +96,7 @@
     /**
      * @see Page#onRender()
      */
+    @Override
     public void onRender() {
         List list = customerService.getCustomers();
         table.setRowList(list);

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType1Page.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType1Page.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType1Page.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType1Page.java Wed Jun 10 12:57:14 2009
@@ -20,6 +20,7 @@
 
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides a control listener example Page using the runtime binding of the
@@ -34,10 +35,9 @@
 public class ControlListenerType1Page extends BorderPage {
 
     /* Set the listener to this object's "onLinkClick" method. */
-    public ActionLink myLink = new ActionLink(this, "onLinkClick");
+    @Bindable public ActionLink myLink = new ActionLink(this, "onLinkClick");
 
-    /* Public scope variable are automatically added to the model. */
-    public String msg;
+    @Bindable public String msg;
 
     // --------------------------------------------------------- Event Handlers
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType2Page.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType2Page.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType2Page.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType2Page.java Wed Jun 10 12:57:14 2009
@@ -22,6 +22,7 @@
 import org.apache.click.Control;
 import org.apache.click.control.ActionLink;
 import org.apache.click.examples.page.BorderPage;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides a control listener example Page using the compile time binding of
@@ -35,11 +36,9 @@
  */
 public class ControlListenerType2Page extends BorderPage {
 
-    /* Public scope controls are automatically added to the page. */
-    public ActionLink myLink = new ActionLink();
+    @Bindable public ActionLink myLink = new ActionLink();
 
-    /* Public scope variable are automatically added to the model. */
-    public String msg;
+    @Bindable public String msg;
 
     // ------------------------------------------------------------ Constructor
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleForm.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleForm.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleForm.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleForm.java Wed Jun 10 12:57:14 2009
@@ -22,6 +22,7 @@
 import org.apache.click.control.Submit;
 import org.apache.click.control.TextField;
 import org.apache.click.examples.page.BorderPage;
+import org.apache.click.util.Bindable;
 
 /**
  * Provides a simple Form example Page.
@@ -37,8 +38,8 @@
  */
 public class SimpleForm extends BorderPage {
 
-    public Form form = new Form();
-    public String msg;
+    @Bindable public Form form = new Form();
+    @Bindable public String msg;
 
     // ------------------------------------------------------------ Constructor
 

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleTablePage.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleTablePage.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleTablePage.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleTablePage.java Wed Jun 10 12:57:14 2009
@@ -28,6 +28,7 @@
 import org.apache.click.examples.domain.Customer;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.service.CustomerService;
+import org.apache.click.util.Bindable;
 import org.springframework.stereotype.Component;
 
 /**
@@ -38,7 +39,7 @@
 @Component
 public class SimpleTablePage extends BorderPage {
 
-    public Table table = new Table();
+    @Bindable public Table table = new Table();
 
     @Resource(name="customerService")
     private CustomerService customerService;

Modified: incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/CustomerTable.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/CustomerTable.java?rev=783339&r1=783338&r2=783339&view=diff
==============================================================================
--- incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/CustomerTable.java (original)
+++ incubator/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/CustomerTable.java Wed Jun 10 12:57:14 2009
@@ -24,6 +24,7 @@
 
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.service.CustomerService;
+import org.apache.click.util.Bindable;
 import org.springframework.stereotype.Component;
 
 /**
@@ -35,7 +36,7 @@
 @Component
 public class CustomerTable extends BorderPage {
 
-    public List customers = null;
+    @Bindable public List customers = null;
 
     @Resource(name="customerService")
     private CustomerService customerService;
@@ -53,6 +54,7 @@
      *
      * @see org.apache.click.Page#getTemplate()
      */
+    @Override
     public String getTemplate() {
         return "/border-template.jsp";
     }



Mime
View raw message