click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r921323 [4/5] - in /click/trunk/click: build/ documentation/docs/ examples/src/org/apache/click/examples/control/ examples/src/org/apache/click/examples/control/cayenne/ examples/src/org/apache/click/examples/control/exporter/ examples/src/...
Date Wed, 10 Mar 2010 12:06:36 GMT
Modified: click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/NextPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/NextPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/NextPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/NextPage.java Wed Mar 10 12:06:32 2010
@@ -32,12 +32,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides the next page of a multi page work flow.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class NextPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private Form form = new Form("form");
     private HiddenField courseField;
     private CourseBooking courseBooking;
@@ -48,7 +48,7 @@ public class NextPage extends BorderPage
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public NextPage() {
         courseField = new HiddenField("courseField", CourseBooking.class);
@@ -60,7 +60,7 @@ public class NextPage extends BorderPage
         addControl(form);
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -102,7 +102,7 @@ public class NextPage extends BorderPage
         return true;
     }
 
-    // --------------------------------------------------------- Public Methods
+    // Public Methods ---------------------------------------------------------
 
     public void setCourseBooking(CourseBooking courseBooking) {
         this.courseBooking = courseBooking;

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/StartPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/StartPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/StartPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/StartPage.java Wed Mar 10 12:06:32 2010
@@ -19,8 +19,8 @@
 package org.apache.click.examples.page.pageflow;
 
 import java.util.List;
-
 import java.util.Map;
+
 import javax.annotation.Resource;
 
 import org.apache.click.Context;
@@ -29,6 +29,7 @@ import org.apache.click.control.Option;
 import org.apache.click.control.Select;
 import org.apache.click.control.Submit;
 import org.apache.click.control.TextArea;
+import org.apache.click.element.Element;
 import org.apache.click.element.JsImport;
 import org.apache.click.element.JsScript;
 import org.apache.click.examples.control.InvestmentSelect;
@@ -45,12 +46,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides the start page of a multi page work flow.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class StartPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
 
     private Select customerSelect;
@@ -63,7 +64,7 @@ public class StartPage extends BorderPag
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public StartPage() {
         form.setLabelsPosition("top");
@@ -88,7 +89,7 @@ public class StartPage extends BorderPag
         form.add(new Submit(" Next > ", this, "onNextClick"));
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onSecurityCheck()
@@ -143,13 +144,15 @@ public class StartPage extends BorderPag
         return true;
     }
 
+    // Public Methods ---------------------------------------------------------
+
     /**
      * Return the Page JavaScript resources.
      *
      * @see org.apache.click.Page#getHeadElements()
      */
     @Override
-    public List getHeadElements() {
+    public List<Element> getHeadElements() {
         if (headElements == null) {
             headElements = super.getHeadElements();
 
@@ -181,8 +184,6 @@ public class StartPage extends BorderPag
         return headElements;
     }
 
-    // --------------------------------------------------------- Public Methods
-
     public void setCourseBooking(CourseBooking courseBooking) {
         this.courseBooking = courseBooking;
     }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/panel/FilterPanelDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/panel/FilterPanelDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/panel/FilterPanelDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/panel/FilterPanelDemo.java Wed Mar 10 12:06:32 2010
@@ -30,22 +30,25 @@ import org.apache.click.examples.domain.
 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.DataProvider;
 import org.springframework.stereotype.Component;
 
 /**
  * Provides example usage of a custom date range FilterPanel control.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class FilterPanelDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected FilterPanel filterPanel = new FilterPanel();
     @Bindable protected Table table = new Table();
 
     @Resource(name="customerService")
     private CustomerService customerService;
 
+    // Constructor ------------------------------------------------------------
+
     public FilterPanelDemo() {
         // Setup customers table
         table.setClass("isi");
@@ -69,18 +72,14 @@ public class FilterPanelDemo extends Bor
         column.setTextAlign("right");
         column.setFormat("{0, date,dd MMM yyyy}");
         table.addColumn(column);
-    }
 
-    /**
-     * @see org.apache.click.Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        Date from = filterPanel.getStartDate();
-        Date to = filterPanel.getEndDate();
-
-        List<Customer> customers = customerService.getCustomers(from, to);
-
-        table.setRowList(customers);
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                Date from = filterPanel.getStartDate();
+                Date to = filterPanel.getEndDate();
+                return customerService.getCustomers(from, to);
+            }
+        });
     }
+
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/panel/ListPanelDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/panel/ListPanelDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/panel/ListPanelDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/panel/ListPanelDemo.java Wed Mar 10 12:06:32 2010
@@ -23,6 +23,7 @@ import java.util.List;
 import javax.annotation.Resource;
 
 import org.apache.click.control.Panel;
+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.extras.panel.ListPanel;
@@ -34,14 +35,14 @@ import org.springframework.stereotype.Co
  * <p/>
  * Please note the ListPanel control will be automatically add to the Page using
  * the fields name "listPanel".
- *
- * @author Phil Barnes
  */
 @Component
 public class ListPanelDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected ListPanel listPanel = new ListPanel();
-    @Bindable protected List customers;
+    @Bindable protected List<Customer> customers;
 
     @Resource(name="customerService")
     private CustomerService customerService;

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/panel/PanelColumn.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/panel/PanelColumn.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/panel/PanelColumn.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/panel/PanelColumn.java Wed Mar 10 12:06:32 2010
@@ -25,8 +25,6 @@ import org.apache.click.util.HtmlStringB
 
 /**
  * Provides a custom Column that wraps a Panel for display in a Table.
- *
- * @author rlecheta
  */
 public class PanelColumn extends Column {
 
@@ -34,14 +32,14 @@ public class PanelColumn extends Column 
 
     private final Panel panel;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public PanelColumn(String name, Panel panel) {
         super(name);
         this.panel = panel;
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see Column#renderTableDataContent(Object, HtmlStringBuffer, Context, int)

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/panel/PanelColumnDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/panel/PanelColumnDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/panel/PanelColumnDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/panel/PanelColumnDemo.java Wed Mar 10 12:06:32 2010
@@ -36,12 +36,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Demonstrates usage of the Panel Column Control.
- *
- * @author rlecheta
  */
 @Component
 public class PanelColumnDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Panel panel = new Panel("panel", "/panel/customerDetailsPanel.htm");
     @Bindable protected Form form = new Form();
     @Bindable protected String nameSearch;
@@ -52,7 +52,7 @@ public class PanelColumnDemo extends Bor
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public PanelColumnDemo() {
         form.setMethod("get");
@@ -66,7 +66,7 @@ public class PanelColumnDemo extends Bor
         table.setPageSize(3);
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * Search button handler
@@ -97,7 +97,7 @@ public class PanelColumnDemo extends Bor
         }
     }
 
-    // -------------------------------------------------------- Private Methods
+    // Private Methods --------------------------------------------------------
 
     /**
      * Search the Customer by name and create the Table control

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/panel/ReusablePanelDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/panel/ReusablePanelDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/panel/ReusablePanelDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/panel/ReusablePanelDemo.java Wed Mar 10 12:06:32 2010
@@ -24,11 +24,11 @@ import org.apache.click.examples.page.Bo
 /**
  * Provides example usage of a reusable ClientPanel, which contains a Form for
  * capturing Client details.
- *
- * @author Bob Schellink
  */
 public class ReusablePanelDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private ClientPanel clientPanel = new ClientPanel("panel");
 
     @Override

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/panel/SimplePanelDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/panel/SimplePanelDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/panel/SimplePanelDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/panel/SimplePanelDemo.java Wed Mar 10 12:06:32 2010
@@ -24,11 +24,11 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides a simple Panel demonstration.
- *
- * @author Malcolm Edgar
  */
 public class SimplePanelDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Panel panel = new Panel("panel", "/panel/simple-panel.htm");
 
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/panel/TabbedPanelDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/panel/TabbedPanelDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/panel/TabbedPanelDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/panel/TabbedPanelDemo.java Wed Mar 10 12:06:32 2010
@@ -23,6 +23,7 @@ import java.util.List;
 import javax.annotation.Resource;
 
 import org.apache.click.control.Panel;
+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.extras.panel.TabbedPanel;
@@ -31,18 +32,20 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides an TabbedPanel demonstration.
- *
- * @author Phil Barnes
  */
 @Component
 public class TabbedPanelDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected TabbedPanel tabbedPanel = new TabbedPanel();
-    @Bindable protected List customers;
+    @Bindable protected List<Customer> customers;
 
     @Resource(name="customerService")
     private CustomerService customerService;
 
+    // Constructor ------------------------------------------------------------
+
     public TabbedPanelDemo() {
         Panel panel1 = new Panel("panel1", "panel/customersPanel1.htm");
         panel1.setLabel("The First Panel");
@@ -60,6 +63,8 @@ public class TabbedPanelDemo extends Bor
         tabbedPanel.setTabListener(this, "onTabClick");
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     public boolean onTabClick() {
         System.out.println("Tab Clicked");
         return true;

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/quartz/QuartzJobAndTriggerPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/quartz/QuartzJobAndTriggerPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/quartz/QuartzJobAndTriggerPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/quartz/QuartzJobAndTriggerPage.java Wed Mar 10 12:06:32 2010
@@ -38,11 +38,11 @@ import org.quartz.impl.StdSchedulerFacto
 
 /**
  * Provides a Quartz Job and Simple Trigger edit page.
- *
- * @author Malcolm Edgar
  */
 public class QuartzJobAndTriggerPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private Form form = new Form("form");
     private TextField nameField = new TextField("name", true);
     private TextField classnameField = new TextField("classname", true);
@@ -54,6 +54,8 @@ public class QuartzJobAndTriggerPage ext
 
     private SchedulerService schedulerService;
 
+    // Constructor ------------------------------------------------------------
+
     public QuartzJobAndTriggerPage() {
 
         // Form
@@ -104,6 +106,8 @@ public class QuartzJobAndTriggerPage ext
 
         Submit saveSubmit = new Submit("Save");
         saveSubmit.setActionListener(new ActionListener(){
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 return onSaveClick();
             }
@@ -112,6 +116,8 @@ public class QuartzJobAndTriggerPage ext
 
         Submit cancelSubmit = new Submit("Cancel");
         cancelSubmit.setActionListener(new ActionListener(){
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 setRedirect(QuartzJobSchedulerPage.class);
                 return false;

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/quartz/QuartzJobSchedulerPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/quartz/QuartzJobSchedulerPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/quartz/QuartzJobSchedulerPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/quartz/QuartzJobSchedulerPage.java Wed Mar 10 12:06:32 2010
@@ -44,11 +44,11 @@ import org.quartz.impl.StdSchedulerFacto
 
 /**
  * Provides a Quartz Job Schedule search page.
- *
- * @author Malcolm Edgar
  */
 public class QuartzJobSchedulerPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private static final String DATE_FORMAT = "{0,date,hh:mm a d MMM yy }";
 
     /** The auto bound refresh button. */
@@ -130,6 +130,8 @@ public class QuartzJobSchedulerPage exte
         pauseLink.setAttribute("class", "actionIcon");
         pauseLink.setTitle("Pause Job");
         pauseLink.setActionListener(new ActionListener(){
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 String name = pauseLink.getValue();
                 getSchedulerService().pauseJob(name);
@@ -142,6 +144,8 @@ public class QuartzJobSchedulerPage exte
         interruptLink.setAttribute("class", "actionIcon");
         interruptLink.setTitle("Interrupt Running Job");
         interruptLink.setActionListener(new ActionListener(){
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 String name = interruptLink.getValue();
                 if (getSchedulerService().interuptJob(name)) {
@@ -157,6 +161,8 @@ public class QuartzJobSchedulerPage exte
         triggerLink.setAttribute("class", "actionIcon");
         triggerLink.setTitle("Trigger Job");
         triggerLink.setActionListener(new ActionListener(){
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 String name = triggerLink.getValue();
                 getSchedulerService().triggerJob(name);
@@ -169,6 +175,8 @@ public class QuartzJobSchedulerPage exte
         resumeLink.setAttribute("class", "actionIcon");
         resumeLink.setTitle("Resume Job");
         resumeLink.setActionListener(new ActionListener(){
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 String name = resumeLink.getValue();
                 getSchedulerService().resumeJob(name);
@@ -183,6 +191,8 @@ public class QuartzJobSchedulerPage exte
         String confirmMessage = getMessage("deleteConfirm", "Job");
         deleteLink.setAttribute("onclick", "return window.confirm('" + confirmMessage + "')");
         deleteLink.setActionListener(new ActionListener(){
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 String name = deleteLink.getValue();
                 if (getSchedulerService().deleteJob(name)) {
@@ -246,6 +256,8 @@ public class QuartzJobSchedulerPage exte
         // Add Control Buttons.
 
         newJob.setActionListener(new ActionListener(){
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 setRedirect(QuartzJobAndTriggerPage.class);
                 return false;
@@ -265,7 +277,6 @@ public class QuartzJobSchedulerPage exte
         }
     }
 
-    @SuppressWarnings("unchecked")
     @Override
     public void onRender() {
         super.onRender();

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/security/Login.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/security/Login.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/security/Login.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/security/Login.java Wed Mar 10 12:06:32 2010
@@ -36,12 +36,11 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides a user authentication login Page.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class Login extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
     @Bindable protected Form form = new Form();
     @Bindable protected HiddenField redirectField = new HiddenField("redirect", String.class);
 
@@ -51,7 +50,7 @@ public class Login extends BorderPage {
     @Resource(name="userService")
     private UserService userService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public Login() {
         usernameField.setMaxLength(20);
@@ -69,7 +68,7 @@ public class Login extends BorderPage {
         form.add(redirectField);
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     @Override
     public void onInit() {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/security/Logout.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/security/Logout.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/security/Logout.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/security/Logout.java Wed Mar 10 12:06:32 2010
@@ -25,11 +25,11 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides an user session logout Page.
- *
- * @author Malcolm Edgar
  */
 public class Logout extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected User user;
 
     /**

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/security/Secure.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/security/Secure.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/security/Secure.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/security/Secure.java Wed Mar 10 12:06:32 2010
@@ -24,11 +24,11 @@ import org.apache.click.examples.page.Bo
 /**
  * Provides an <tt>onSecurityCheck</tt> example secure Page, which other secure
  * pages can extend.
- *
- * @author Malcolm Edgar
  */
 public class Secure extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * @see Page#onSecurityCheck()
      */

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/CreateAccountPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/CreateAccountPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/CreateAccountPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/CreateAccountPage.java Wed Mar 10 12:06:32 2010
@@ -41,9 +41,14 @@ import org.springframework.security.cont
 import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
 import org.springframework.stereotype.Component;
 
+/**
+ * Provides an Spring Security (ACEGI) enabled account creation page.
+ */
 @Component
 public class CreateAccountPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private Form form = new Form("form");
     private TextField fullNameField = new TextField(User.FULLNAME_PROPERTY, "Full Name", true);
     private EmailField emailField = new EmailField(User.EMAIL_PROPERTY);
@@ -73,6 +78,8 @@ public class CreateAccountPage extends B
 
         Submit submit = new Submit("create");
         submit.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 return onCreate();
             }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/LoginPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/LoginPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/LoginPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/LoginPage.java Wed Mar 10 12:06:32 2010
@@ -22,9 +22,9 @@ import org.apache.click.examples.page.Bo
 
 /**
  * Provides a Spring Security (Acegi) login page.
- *
- * @author Malcolm Edgar
  */
 public class LoginPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/LogoutPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/LogoutPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/LogoutPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/LogoutPage.java Wed Mar 10 12:06:32 2010
@@ -22,13 +22,11 @@ import org.apache.click.examples.page.Bo
 import org.apache.click.examples.page.springsecurity.secure.SecurePage;
 
 /**
- * Provides a Spring Security (Acegi) logout page.
- *
- * @author Malcolm Edgar
+ * Provides a Spring Security (ACEGI) logout page.
  */
 public class LogoutPage extends BorderPage {
 
-    // Event Handlers ---------------------------------------------------------
+    private static final long serialVersionUID = 1L;
 
     @Override
     public boolean onSecurityCheck() {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/NotAuthorizedPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/NotAuthorizedPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/NotAuthorizedPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/NotAuthorizedPage.java Wed Mar 10 12:06:32 2010
@@ -21,10 +21,10 @@ package org.apache.click.examples.page.s
 import org.apache.click.examples.page.BorderPage;
 
 /**
- * Provides a Spring Security (Acegi) logout page.
- *
- * @author Malcolm Edgar
+ * Provides a Security Not Authorized message display page.
  */
 public class NotAuthorizedPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/secure/SecurePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/secure/SecurePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/secure/SecurePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/springsecurity/secure/SecurePage.java Wed Mar 10 12:06:32 2010
@@ -20,6 +20,11 @@ package org.apache.click.examples.page.s
 
 import org.apache.click.examples.page.BorderPage;
 
+/**
+ * Provides a Spring Security (ACEGI) path protected secure page class.
+ */
 public class SecurePage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/EditFormTablePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/EditFormTablePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/EditFormTablePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/EditFormTablePage.java Wed Mar 10 12:06:32 2010
@@ -23,7 +23,7 @@ import java.util.List;
 
 import javax.annotation.Resource;
 
-import org.apache.cayenne.access.DataContext;
+import org.apache.cayenne.BaseContext;
 import org.apache.click.control.ActionLink;
 import org.apache.click.control.Checkbox;
 import org.apache.click.control.Column;
@@ -57,14 +57,12 @@ import org.springframework.stereotype.Co
  * #2. By default FormTable creates an internal Form for submissions. However
  * it is possible to use the FormTable constructor which accepts a Form so that
  * FormTable can be added to this "external" Form.
- *
- *
- * @author Malcolm Edgar
- * @author Bob Schellink
  */
 @Component
 public class EditFormTablePage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private static final int NUM_ROWS = 20;
 
     private FormTable table;
@@ -75,6 +73,8 @@ public class EditFormTablePage extends B
 
     private Form form = new Form("form") {
 
+        private static final long serialVersionUID = 1L;
+
         /**
          * #1. PLEASE NOTE: FormTable will only be processed by form if the
          * Form is submitted. Thus paging and sorting won't work by default.
@@ -96,7 +96,7 @@ public class EditFormTablePage extends B
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public EditFormTablePage() {
         // Setup customers form
@@ -111,7 +111,7 @@ public class EditFormTablePage extends B
         customerForm.add(fieldSet);
         customerForm.add(new Submit("add", "Add Customer", this, "onAddClick"));
 
-        // * #2. Create the FormTable and pass in the existing Form into the
+        // #2. Create the FormTable and pass in the existing Form into the
         // constructor. FormTable now knows it should not create an internal
         // Form instance.
         table = new FormTable("table", form);
@@ -174,7 +174,7 @@ public class EditFormTablePage extends B
         addControl(form);
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     @Override
     public boolean onSecurityCheck() {
@@ -203,7 +203,7 @@ public class EditFormTablePage extends B
         if (form.isValid()) {
             // Please note with Cayenne ORM this will persist any changes
             // to data objects submitted by the form.
-            DataContext.getThreadDataContext().commitChanges();
+            BaseContext.getThreadObjectContext().commitChanges();
         }
         return true;
     }
@@ -211,7 +211,7 @@ public class EditFormTablePage extends B
     public boolean onCancelClick() {
         // Rollback any changes made to the customers, which are stored in
         // the data context
-        DataContext.getThreadDataContext().rollbackChanges();
+         BaseContext.getThreadObjectContext().rollbackChanges();
 
         refreshTableCustomers();
 
@@ -259,6 +259,8 @@ public class EditFormTablePage extends B
         return true;
     }
 
+    // Private Methods --------------------------------------------------------
+
     private void refreshTableCustomers() {
         List<Customer> allCustomers = customerService.getCustomersSortedBy(Customer.DATE_JOINED_PROPERTY, false);
         List<Customer> customers = allCustomers.subList(0, NUM_ROWS);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/EditTable.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/EditTable.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/EditTable.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/EditTable.java Wed Mar 10 12:06:32 2010
@@ -39,17 +39,18 @@ import org.apache.click.extras.control.D
 import org.apache.click.extras.control.EmailField;
 import org.apache.click.extras.control.LinkDecorator;
 import org.apache.click.util.Bindable;
+import org.apache.click.util.DataProvider;
 import org.springframework.stereotype.Component;
 
 /**
  * Provides an demonstration of Table and Form editor pattern, and the use
  * CayenneForm and LinkDecorator classes.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class EditTable extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected CayenneForm form = new CayenneForm("form", Customer.class);
     @Bindable protected Table table = new Table();
     @Bindable protected ActionLink editLink = new ActionLink("edit", "Edit", this, "onEditClick");
@@ -58,7 +59,7 @@ public class EditTable extends BorderPag
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public EditTable() {
         // Setup customers form
@@ -105,9 +106,15 @@ public class EditTable extends BorderPag
         table.addColumn(column);
 
         deleteLink.setAttribute("onclick", "return window.confirm('Please confirm delete');");
+
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                return customerService.getCustomers();
+            }
+        });
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     public boolean onEditClick() {
         Integer id = editLink.getValueInteger();
@@ -161,13 +168,4 @@ public class EditTable extends BorderPag
         table.setSortedColumn(form.getField(Table.COLUMN).getValue());
     }
 
-    /**
-     * @see org.apache.click.Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        List<Customer> customers = customerService.getCustomers();
-        table.setRowList(customers);
-    }
-
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/FormTablePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/FormTablePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/FormTablePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/FormTablePage.java Wed Mar 10 12:06:32 2010
@@ -22,7 +22,7 @@ import java.util.List;
 
 import javax.annotation.Resource;
 
-import org.apache.cayenne.access.DataContext;
+import org.apache.cayenne.BaseContext;
 import org.apache.click.control.Checkbox;
 import org.apache.click.control.Column;
 import org.apache.click.control.Form;
@@ -30,24 +30,25 @@ import org.apache.click.control.Submit;
 import org.apache.click.control.Table;
 import org.apache.click.control.TextField;
 import org.apache.click.examples.control.InvestmentSelect;
+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.extras.control.DateField;
 import org.apache.click.extras.control.EmailField;
 import org.apache.click.extras.control.FieldColumn;
 import org.apache.click.extras.control.FormTable;
 import org.apache.click.extras.control.NumberField;
-import org.apache.click.extras.control.DateField;
 import org.apache.click.util.Bindable;
 import org.springframework.stereotype.Component;
 
 /**
  * Provides an demonstration of Table control paging.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class FormTablePage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private static final int NUM_ROWS = 20;
 
     @Bindable protected FormTable table = new FormTable();
@@ -55,7 +56,7 @@ public class FormTablePage extends Borde
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public FormTablePage() {
         // Setup customers table
@@ -99,7 +100,7 @@ public class FormTablePage extends Borde
         table.getForm().add(new Submit("cancel", this, "onCancelClick"));
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -111,7 +112,7 @@ public class FormTablePage extends Borde
         // Please note the FormTable rowList MUST be populated before the
         // control is processed, i.e. do not populate the FormTable in the
         // Pages onRender() method.
-        List customers = customerService.getCustomersSortedByName(NUM_ROWS);
+        List<Customer> customers = customerService.getCustomersSortedByName(NUM_ROWS);
         table.setRowList(customers);
     }
 
@@ -119,7 +120,7 @@ public class FormTablePage extends Borde
         if (table.getForm().isValid()) {
             // Please note with Cayenne ORM this will persist any changes
             // to data objects submitted by the form.
-            DataContext.getThreadDataContext().commitChanges();
+            BaseContext.getThreadObjectContext().commitChanges();
 
             // With other ORM frameworks like Hibernate you would retrieve
             // rows for the table as persist those objects. For example:
@@ -137,9 +138,9 @@ public class FormTablePage extends Borde
     public boolean onCancelClick() {
         // Rollback any changes made to the customers, which are stored in
         // the data context
-        DataContext.getThreadDataContext().rollbackChanges();
+        BaseContext.getThreadObjectContext().rollbackChanges();
 
-        List customers = customerService.getCustomersSortedByName(NUM_ROWS);
+        List<Customer> customers = customerService.getCustomersSortedByName(NUM_ROWS);
 
         table.setRowList(customers);
         table.setRenderSubmittedValues(false);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/LargeDatasetDemo.java Wed Mar 10 12:06:32 2010
@@ -18,7 +18,6 @@
  */
 package org.apache.click.examples.page.table;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import javax.annotation.Resource;
@@ -28,23 +27,27 @@ import org.apache.click.control.Table;
 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.extras.util.PaginatingList;
 import org.apache.click.util.Bindable;
+import org.apache.click.util.DataProvider;
 import org.springframework.stereotype.Component;
 
 /**
  * Provides a demonstration of a Table with a huge number of rows and how to
- * lazily page through the rows using a custom List implementation.
- *
- * @author Bob Schellink
+ * lazily page through the rows using a paginating list.
  */
 @Component
 public class LargeDatasetDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Table table;
 
     @Resource(name="customerService")
     private CustomerService customerService;
 
+    // Constructor ------------------------------------------------------------
+
     public LargeDatasetDemo() {
         table = new Table();
 
@@ -77,93 +80,34 @@ public class LargeDatasetDemo extends Bo
         table.addColumn(column);
 
         table.setPageSize(5);
-    }
-
-    /**
-     * @see org.apache.click.Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        // Create DataProvider for the specified table and total number of customers
-        DataProvider dataProvider = new DataProvider(table, getCustomerCount());
-
-        // Set the DataProvider as the Table row list. Table is now able to
-        // calculate the last row value.
-        // NOTE: If table rowList is not set, table cannot calculate the last row
-        // and invoking #getLastRow will return 0.
-        table.setRowList(dataProvider);
-
-        // Retrieve customers given the firstRow, lastRow and pageSize
-        List customers = getCustomers(table.getFirstRow(), table.getPageSize(),
-            table.getSortedColumn(), table.isSortedAscending());
 
-        // Add the customers to the table dataProvider
-        dataProvider.addAll(customers);
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                return getPaginatingList();
+            }
+        });
     }
 
-    // ---------------------------------------------------------- Inner Classes
+    // Private Methods --------------------------------------------------------
 
-    /**
-     * Provides a custom List implementation which returns a pre-defined size,
-     * even if the underlying amount of entries is less.
-     *
-     * The List also returns correct row for a specified index by offsetting
-     * the index against the Table's firstRow value.
-     */
-    class DataProvider extends ArrayList {
-
-        /** The DataProvider Table instance. */
-        private Table table;
-
-        /** The total number of rows of the dataProvider. */
-        private int numOfRows;
-
-        /**
-         * Create a new DataProvider instance for the given Table and total number
-         * of rows.
-         *
-         * @param table this dataProvider Table instance
-         * @param numOfRows the total number of rows of the dataProvider
-         */
-        public DataProvider(Table table, int numOfRows) {
-            this.table = table;
-            this.numOfRows = numOfRows;
-        }
-
-        /**
-         * Returns the row at the specified index, offsetted by the current
-         * table first row value.
-         *
-         * @param index the index of the row as viewed in the Table
-         * @return the the row at the specified index, offsetted by the
-         * current table first row value.
-         */
-        public Object get(final int index) {
-            int realIndex = index - table.getFirstRow();
-            return super.get(realIndex);
-        }
-
-        /**
-         * Always return the total number of rows even if the number of entries
-         * are less.
-         */
-        public int size() {
-            return numOfRows;
-        }
-    }
-
-    // -------------------------------------------------------- Private Methods
-
-    private int getCustomerCount() {
-        return customerService.getNumberOfCustomers();
-    }
+    private PaginatingList<Customer> getPaginatingList() {
 
-    private List<Customer> getCustomers(int from, int pageSize, String sortedColumn,
-        boolean ascending) {
-        // Below we retrieve only those customers between the from and to
-        // args. In a real application one would use an ORM or JDBC to only
-        // retrieve the needed rows
-        return customerService.getCustomersForPage(from, pageSize, sortedColumn, ascending);
+        // Below we retrieve only those customers between:
+        //     first row .. (first row + page size)
+        // In a real application one would use an ORM or JDBC to only retrieve
+        // the needed rows
+        List<Customer> customerList =
+            customerService.getCustomersForPage(table.getFirstRow(),
+                                                table.getPageSize(),
+                                                table.getSortedColumn(),
+                                                table.isSortedAscending());
+
+        int customerCount = customerService.getNumberOfCustomers();
+
+        return new PaginatingList<Customer>(customerList,
+                                            table.getFirstRow(),
+                                            table.getPageSize(),
+                                            customerCount);
     }
 
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/SearchTablePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/SearchTablePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/SearchTablePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/SearchTablePage.java Wed Mar 10 12:06:32 2010
@@ -37,14 +37,13 @@ import org.apache.click.extras.control.D
 import org.apache.click.extras.control.LinkDecorator;
 import org.apache.click.extras.control.TableInlinePaginator;
 import org.apache.click.util.Bindable;
+import org.apache.click.util.DataProvider;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 
 /**
  * Provides an demonstration of Table control paging.
- *
- * @author Malcolm Edgar
  */
 public class SearchTablePage extends BorderPage implements ApplicationContextAware {
 
@@ -60,7 +59,7 @@ public class SearchTablePage extends Bor
 
     private transient ApplicationContext applicationContext;
 
-    // ----------------------------------------------------------- Constructors
+    // Constructor ------------------------------------------------------------
 
     public SearchTablePage() {
         setStateful(true);
@@ -116,9 +115,16 @@ public class SearchTablePage extends Bor
         column.setDecorator(new LinkDecorator(table, links, "id"));
         column.setSortable(false);
         table.addColumn(column);
+
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                return getCustomerService().getCustomers(nameField.getValue(),
+                                                         dateField.getDate());
+            }
+        });
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * Handle the clear button click event.
@@ -154,16 +160,7 @@ public class SearchTablePage extends Bor
         return true;
     }
 
-    /**
-     * @see org.apache.click.Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        List customers =
-            getCustomerService().getCustomers(nameField.getValue(), dateField.getDate());
-
-        table.setRowList(customers);
-    }
+    // Public Methods ---------------------------------------------------------
 
     /**
      * Return CustomerService instance from Spring application context.

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/TableDecorator.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/TableDecorator.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/TableDecorator.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/TableDecorator.java Wed Mar 10 12:06:32 2010
@@ -33,16 +33,17 @@ import org.apache.click.examples.page.Bo
 import org.apache.click.examples.page.EditCustomer;
 import org.apache.click.examples.service.CustomerService;
 import org.apache.click.util.Bindable;
+import org.apache.click.util.DataProvider;
 import org.springframework.stereotype.Component;
 
 /**
  * Provides an demonstration of Table control paging.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class TableDecorator extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Table table = new Table();
     @Bindable protected Customer customerDetail;
 
@@ -53,7 +54,7 @@ public class TableDecorator extends Bord
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public TableDecorator() {
         // Setup customers table
@@ -105,9 +106,15 @@ public class TableDecorator extends Bord
             }
         });
         table.addColumn(column);
+
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                return customerService.getCustomersSortedByName(12);
+            }
+        });
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     public boolean onViewClick() {
         Integer id = viewLink.getValueInteger();
@@ -121,13 +128,4 @@ public class TableDecorator extends Bord
         return true;
     }
 
-    /**
-     * @see org.apache.click.Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        List customers = customerService.getCustomersSortedByName(12);
-        table.setRowList(customers);
-    }
-
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/TableFooter.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/TableFooter.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/TableFooter.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/TableFooter.java Wed Mar 10 12:06:32 2010
@@ -29,24 +29,29 @@ import org.apache.click.examples.domain.
 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.DataProvider;
 import org.apache.click.util.HtmlStringBuffer;
 import org.springframework.stereotype.Component;
 
 /**
  * Provides an demonstration of Table control paging.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class TableFooter extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Table table;
 
     @Resource(name="customerService")
     private CustomerService customerService;
 
+    // Constructor ------------------------------------------------------------
+
     public TableFooter() {
         table = new Table() {
+            private static final long serialVersionUID = 1L;
+
             public void renderFooterRow(HtmlStringBuffer buffer) {
                 renderTotalHoldingsFooter(buffer);
             }
@@ -74,17 +79,16 @@ public class TableFooter extends BorderP
         column.setTextAlign("right");
         column.setWidth("100px;");
         table.addColumn(column);
-    }
 
-    /**
-     * @see org.apache.click.Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        List<Customer> customers = customerService.getCustomersSortedByName(17);
-        table.setRowList(customers);
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                return customerService.getCustomersSortedByName(17);
+            }
+        });
     }
 
+    // Private Methods --------------------------------------------------------
+
     /**
      * Render the total holdings footer.
      *

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaginatorPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaginatorPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaginatorPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaginatorPage.java Wed Mar 10 12:06:32 2010
@@ -34,12 +34,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides an demonstration of Table pagination options.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class TablePaginatorPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Table table1 = new Table();
     @Bindable protected Table table2 = new Table();
     @Bindable protected Table table3 = new Table();
@@ -47,6 +47,8 @@ public class TablePaginatorPage extends 
     @Resource(name="customerService")
     private CustomerService customerService;
 
+    // Constructor ------------------------------------------------------------
+
     public TablePaginatorPage() {
         // Table 1
         addColumns(table1);
@@ -64,6 +66,8 @@ public class TablePaginatorPage extends 
         table3.setPaginatorAttachment(Table.PAGINATOR_INLINE);
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     /**
      * @see org.apache.click.Page#onRender()
      */
@@ -75,6 +79,8 @@ public class TablePaginatorPage extends 
         table3.setRowList(customers);
     }
 
+    // Private Methods --------------------------------------------------------
+
     private void addColumns(Table table) {
         table.setClass(Table.CLASS_ITS);
         table.setPageSize(4);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaging.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaging.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaging.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/TablePaging.java Wed Mar 10 12:06:32 2010
@@ -28,16 +28,17 @@ import org.apache.click.examples.domain.
 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.DataProvider;
 import org.springframework.stereotype.Component;
 
 /**
  * Provides an demonstration of Table control paging.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class TablePaging extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Table table = new Table();
 
     @Resource(name="customerService")
@@ -69,14 +70,12 @@ public class TablePaging extends BorderP
         column.setTextAlign("right");
         column.setWidth("100px;");
         table.addColumn(column);
-    }
 
-    /**
-     * @see org.apache.click.Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        List<Customer> customers = customerService.getCustomers();
-        table.setRowList(customers);
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                return customerService.getCustomers();
+            }
+        });
     }
+
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/TableSorting.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/TableSorting.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/TableSorting.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/TableSorting.java Wed Mar 10 12:06:32 2010
@@ -27,7 +27,7 @@ import org.apache.click.control.Table;
 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.DataProvider;
 import org.springframework.stereotype.Component;
 
 /**
@@ -36,14 +36,14 @@ import org.springframework.stereotype.Co
 @Component
 public class TableSorting extends BorderPage {
 
-    @Bindable protected Table table = new Table();
+    private static final long serialVersionUID = 1L;
 
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
-
     public TableSorting() {
+        final Table table = new Table("table");
+
         // Setup customers table
         table.setClass(Table.CLASS_SIMPLE);
         table.setHoverRows(true);
@@ -71,24 +71,18 @@ public class TableSorting extends Border
         column = new Column("active");
         column.setTextAlign("center");
         table.addColumn(column);
-    }
 
-    // --------------------------------------------------------- Event Handlers
+        // Return sorted data to the table.
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                return customerService.getCustomersSortedBy(table.getSortedColumn(),
+                                                            table.isSortedAscending());
+            }
+        });
 
-    /**
-     * Load the Table rowList to render using the selected sorting column, and
-     * then set the Table status to sorted.
-     *
-     * @see org.apache.click.Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        List<Customer> customers =
-            customerService.getCustomersSortedBy(table.getSortedColumn(),
-                                                 table.isSortedAscending());
-
-        table.setRowList(customers);
         table.setSorted(true);
+
+        addControl(table);
     }
 
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/table/TableStyles.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/table/TableStyles.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/table/TableStyles.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/table/TableStyles.java Wed Mar 10 12:06:32 2010
@@ -31,14 +31,13 @@ import org.apache.click.examples.page.Bo
 import org.apache.click.examples.service.CustomerService;
 import org.apache.click.extras.control.TableInlinePaginator;
 import org.apache.click.util.Bindable;
+import org.apache.click.util.DataProvider;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 
 /**
  * Provides an demonstration of Table control styles.
- *
- * @author Malcolm Edgar
  */
 public class TableStyles extends BorderPage implements ApplicationContextAware {
 
@@ -52,9 +51,11 @@ public class TableStyles extends BorderP
 
     private transient ApplicationContext applicationContext;
 
-    // ----------------------------------------------------------- Constructor
+    // Constructor -----------------------------------------------------------
 
     public TableStyles() {
+        // Store form's selection data  in the session so is data will be
+        // available after table control GET requests have been processed
         setStateful(true);
 
         // Setup table style select.
@@ -104,9 +105,15 @@ public class TableStyles extends BorderP
         column.setTextAlign("right");
         column.setWidth("100px;");
         table.addColumn(column);
+
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                return getCustomerService().getCustomers();
+            }
+        });
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onRender()
@@ -115,11 +122,10 @@ public class TableStyles extends BorderP
     public void onRender() {
         table.setClass(styleSelect.getValue());
         table.setHoverRows(hoverCheckbox.isChecked());
-
-        List<Customer> customers = getCustomerService().getCustomers();
-        table.setRowList(customers);
     }
 
+    // Public Methods ---------------------------------------------------------
+
     /**
      * Return CustomerService instance from Spring application context.
      *

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/tree/AdvancedTreePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/tree/AdvancedTreePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/tree/AdvancedTreePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/tree/AdvancedTreePage.java Wed Mar 10 12:06:32 2010
@@ -35,16 +35,16 @@ import org.apache.click.extras.tree.Tree
 
 /**
  * Example usage of some extra functionality of the {@link Tree} control.
- *
- * @author Bob Schellink
  */
 public class AdvancedTreePage extends BorderPage implements TreeListener {
 
+    private static final long serialVersionUID = 1L;
+
     public static final String TREE_NODES_SESSION_KEY = "advancedTreeNodes";
 
     private Tree tree;
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -82,7 +82,7 @@ public class AdvancedTreePage extends Bo
         return true;
     }
 
-    // --------------------------------------------------------- Public Methods
+    // Public Methods ---------------------------------------------------------
 
     /**
      * Creates and return a new tree instance.
@@ -170,7 +170,7 @@ public class AdvancedTreePage extends Bo
         return tree;
     }
 
-    // --------------------------------------------------- TreeListener Support
+    // TreeListener Support ---------------------------------------------------
 
     /**
      * This method, which implements TreeListener, is called when a node is selected

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/tree/CheckboxTreePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/tree/CheckboxTreePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/tree/CheckboxTreePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/tree/CheckboxTreePage.java Wed Mar 10 12:06:32 2010
@@ -37,11 +37,11 @@ import org.apache.click.extras.tree.Tree
 
 /**
  * Example usage of the {@link CheckboxTree} control.
- *
- * @author Bob Schellink
  */
 public class CheckboxTreePage extends BorderPage implements TreeListener {
 
+    private static final long serialVersionUID = 1L;
+
     public static final String TREE_NODES_SESSION_KEY = "checkboxTreeNodes";
 
     private CheckboxTree tree;
@@ -49,7 +49,7 @@ public class CheckboxTreePage extends Bo
     private Submit okSubmit;
     private Reset resetBtn;
 
-    // --------------------------------------------------------- Event Handlers
+    //  Event Handlers --------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -83,7 +83,7 @@ public class CheckboxTreePage extends Bo
         buildOptionsUI();
     }
 
-    // --------------------------------------------------------- Public Methods
+    // Public Methods ---------------------------------------------------------
 
     /**
      * Creates and return a new tree instance.
@@ -175,7 +175,7 @@ public class CheckboxTreePage extends Bo
         return tree;
     }
 
-    // -------------------------------------------------- TreeListener Support
+    // TreeListener Support ---------------------------------------------------
 
     /**
      * This method, which implements TreeListener, is called when a node is selected
@@ -222,7 +222,7 @@ public class CheckboxTreePage extends Bo
         return list;
     }
 
-    // ------------------------------------------------------------------- NOTE
+    // NOTE -------------------------------------------------------------------
     //The code below is not specific to tree control usage.
 
     private Form optionsForm;

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/tree/PageLinkTreePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/tree/PageLinkTreePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/tree/PageLinkTreePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/tree/PageLinkTreePage.java Wed Mar 10 12:06:32 2010
@@ -36,14 +36,14 @@ import org.apache.commons.lang.ClassUtil
  * Demonstrates how to customize the rendering of tree nodes.
  * <p/>
  * In this example tree nodes render links to Pages.
- *
- * @author Bob Schellink
  */
 public class PageLinkTreePage extends TreePage {
 
+    private static final long serialVersionUID = 1L;
+
     public static final String TREE_NODES_SESSION_KEY = "pageLinkTreeNodes";
 
-    // --------------------------------------------------------- Protected Methods
+    // Protected Methods ------------------------------------------------------
 
     /**
      * Creates and return a new tree instance.

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/tree/TreePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/tree/TreePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/tree/TreePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/tree/TreePage.java Wed Mar 10 12:06:32 2010
@@ -24,16 +24,16 @@ import org.apache.click.extras.tree.Tree
 
 /**
  * Example usage of the {@link Tree} control.
- *
- * @author Bob Schellink
  */
 public class TreePage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     public static final String TREE_NODES_SESSION_KEY = "treeNodes";
 
     protected Tree tree;
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -67,7 +67,7 @@ public class TreePage extends BorderPage
         addModel("treeNode", node);
     }
 
-    // --------------------------------------------------------- Protected Methods
+    // Protected Methods ------------------------------------------------------
 
     /**
      * Creates and return a new tree instance.

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/velocity/ActionTable.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/velocity/ActionTable.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/velocity/ActionTable.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/velocity/ActionTable.java Wed Mar 10 12:06:32 2010
@@ -38,13 +38,13 @@ import org.springframework.stereotype.Co
  * In this example the controls are automatically added to the Page model
  * because they have public visiblity. The controls name is automatically set
  * to their field name.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class ActionTable extends BorderPage {
 
-    @Bindable protected List customers;
+    private static final long serialVersionUID = 1L;
+
+    @Bindable protected List<Customer> customers;
     @Bindable protected Customer customerDetail;
     @Bindable protected ActionLink viewLink = new ActionLink(this, "onViewClick");
     @Bindable protected PageLink editLink = new PageLink(EditCustomer.class);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/velocity/SimpleTable.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/velocity/SimpleTable.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/velocity/SimpleTable.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/velocity/SimpleTable.java Wed Mar 10 12:06:32 2010
@@ -25,14 +25,15 @@ import org.apache.click.examples.page.Bo
 
 /**
  * Provides simple Table example which demonstrates Velocity #foreach directive.
- *
- * @author Malcolm Edgar
  */
 public class SimpleTable extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * @see Page#onRender()
      */
+    @SuppressWarnings("unchecked")
     @Override
     public void onRender() {
         addModel("properties", new TreeMap(System.getProperties()));

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/velocity/VelocityMacro.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/velocity/VelocityMacro.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/velocity/VelocityMacro.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/velocity/VelocityMacro.java Wed Mar 10 12:06:32 2010
@@ -33,11 +33,11 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides a Velocity Macro example.
- *
- * @author Malcolm Edgar
  */
 public class VelocityMacro extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
 
     public VelocityMacro() {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/wizard/SelectPostCode.java Wed Mar 10 12:06:32 2010
@@ -40,12 +40,12 @@ import org.springframework.stereotype.Co
  * It also acts as a fork in step 2, to show how one can navigate away from
  * a stateful page and then go back, with the components on the WizardPage still
  * populated with their old values.
- *
- * @author Bob Schellink
  */
 @Component
 public class SelectPostCode extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     /** Reference to the table. */
     private Table table = new Table("table");
 
@@ -63,6 +63,8 @@ public class SelectPostCode extends Bord
         Column action = new Column("action");
         LinkDecorator decorator = new LinkDecorator(table, selectState, "postCode") {
 
+            private static final long serialVersionUID = 1L;
+
             /**
              * Override default implementation to send parameters
              * address.postCode and address.state to the WizardPage.

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step.java Wed Mar 10 12:06:32 2010
@@ -31,12 +31,12 @@ import org.apache.commons.lang.ClassUtil
 
 /**
  * Provides common functionality for each step in the wizard.
- *
- * @author Bob Schellink
  */
 public abstract class Step extends SimplePanel {
 
-    // -------------------------------------------------------------- Variables
+    private static final long serialVersionUID = 1L;
+
+    // Variables --------------------------------------------------------------
 
     /** Reference to the form. */
     private CayenneForm form = new NestedCayenneForm("form"
@@ -60,7 +60,7 @@ public abstract class Step extends Simpl
     /** Reference to the cancel button. */
     private Button cancel;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     /**
      * Constructs a Step for the specified name and page.
@@ -77,7 +77,7 @@ public abstract class Step extends Simpl
         setDescription(description);
     }
 
-    // ------------------------------------------------------ Public Properties
+    // Public Properties ------------------------------------------------------
 
     /**
      * Return the Step form instance.
@@ -189,7 +189,7 @@ public abstract class Step extends Simpl
         return cancel;
     }
 
-    // --------------------------------------------------------- Public Methods
+    // Public Methods ---------------------------------------------------------
 
     /**
      * The onNext action. Subclasses can override this method to implement
@@ -243,6 +243,7 @@ public abstract class Step extends Simpl
      * Setup and initializes the Step. This method must be called before
      * the Step can be used.
      */
+    @SuppressWarnings("serial")
     public final void init() {
         getForm().setButtonAlign(Form.ALIGN_RIGHT);
         getForm().setErrorsPosition(Form.POSITION_MIDDLE);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java Wed Mar 10 12:06:32 2010
@@ -27,8 +27,6 @@ import org.apache.click.extras.control.E
  * The first step in the 3 step process is to capture the Client details.
  * <p/>
  * Note this Panel has no associated template.
- *
- * @author Bob Schellink
  */
 public class Step1 extends Step {
 
@@ -62,6 +60,7 @@ public class Step1 extends Step {
      *
      * @return true if page processing should continue or not
      */
+    @Override
     public boolean onNext() {
         // Set the page to stateful so the same Page is available throughout the
         // Wizard steps

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step2.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step2.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step2.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step2.java Wed Mar 10 12:06:32 2010
@@ -29,8 +29,6 @@ import org.apache.click.extras.control.I
  * The second step in the 3 step process is to capture the Client address.
  * <p/>
  * Note this Panel has no associated template.
- *
- * @author Bob Schellink
  */
 public class Step2 extends Step {
 
@@ -85,6 +83,7 @@ public class Step2 extends Step {
      * The onInit phase is overridden to check if the post code and state values
      * are passed in from the lookup table.
      */
+    @Override
     public void onInit() {
         // Invoke default onInit implementation
         super.onInit();
@@ -107,6 +106,7 @@ public class Step2 extends Step {
      *
      * @return true if page processing should continue or not
      */
+    @Override
     public boolean onNext() {
         if (getForm().isValid()) {
             // Pass client to next Step
@@ -122,6 +122,7 @@ public class Step2 extends Step {
      *
      * @return true if page processing should continue or not
      */
+    @Override
     public boolean onPrevious() {
         getWizardPage().previous();
         getForm().clearErrors();
@@ -132,6 +133,8 @@ public class Step2 extends Step {
      * Represents a Div HTML element.
      */
     class Div extends AbstractContainer {
+        private static final long serialVersionUID = 1L;
+
         public String getTag() {
             return "div";
         }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step3.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step3.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step3.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step3.java Wed Mar 10 12:06:32 2010
@@ -26,8 +26,6 @@ package org.apache.click.examples.page.w
  * <p/>
  * Step3 uses a Velocity template (Step3.htm) to render client
  * information.
- *
- * @author Bob Schellink
  */
 public class Step3 extends Step {
 
@@ -52,6 +50,7 @@ public class Step3 extends Step {
      *
      * @return true if page processing should continue or not
      */
+    @Override
     public boolean onFinish() {
         if (getForm().isValid()) {
 
@@ -78,6 +77,7 @@ public class Step3 extends Step {
      *
      * @return true if page processing should continue or not
      */
+    @Override
     public boolean onPrevious() {
         getWizardPage().previous();
         getForm().clearValues();
@@ -88,6 +88,7 @@ public class Step3 extends Step {
      * Override onRender phase to add the client instance to the Template
      * model for rendering.
      */
+    @Override
     public void onRender() {
         // Invoke default onInit implementation
         super.onRender();

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/wizard/WizardPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/WizardPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/wizard/WizardPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/wizard/WizardPage.java Wed Mar 10 12:06:32 2010
@@ -26,8 +26,6 @@ import org.apache.click.util.HtmlStringB
 
 /**
  * This Page manages steps in a wizard process.
- *
- * @author Bob Schellink
  */
 public class WizardPage extends BorderPage {
 
@@ -39,6 +37,8 @@ public class WizardPage extends BorderPa
     /** List of all steps. */
     private List<Step> steps = new ArrayList<Step>();
 
+    // Constructor ------------------------------------------------------------
+
     /**
      * Default constructor.
      */
@@ -58,6 +58,8 @@ public class WizardPage extends BorderPa
         }
     }
 
+    // Public Methods ---------------------------------------------------------
+
     /**
      * Return the current step.
      *
@@ -150,6 +152,8 @@ public class WizardPage extends BorderPa
         return "<link type=\"text/css\" rel=\"stylesheet\" href=\"" + contextPath + "/wizard/wizard.css\"/>";
     }
 
+    // Private Methods --------------------------------------------------------
+
     /**
      * Return an HTML representation of the wizard steps as an Html List <ul>.
      * The current step is assigned a special CSS class so it can be highlighted

Modified: click/trunk/click/examples/src/org/apache/click/examples/quartz/ExampleJob.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/quartz/ExampleJob.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/quartz/ExampleJob.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/quartz/ExampleJob.java Wed Mar 10 12:06:32 2010
@@ -25,8 +25,6 @@ import org.quartz.JobExecutionException;
 /**
  * Provides a simple example Quartz Job class which writes 'Hello World' to
  * System.out and then counts to 10.
- *
- * @author Malcolm Edgar
  */
 public class ExampleJob implements Job {
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/quartz/JobAndSimpleTrigger.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/quartz/JobAndSimpleTrigger.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/quartz/JobAndSimpleTrigger.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/quartz/JobAndSimpleTrigger.java Wed Mar 10 12:06:32 2010
@@ -29,8 +29,6 @@ import org.quartz.Trigger;
 
 /**
  * Provides a Quartz Job and Simple Trigger display class.
- *
- * @author Malcolm Edgar
  */
 public class JobAndSimpleTrigger {
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/quartz/SchedulerService.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/quartz/SchedulerService.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/quartz/SchedulerService.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/quartz/SchedulerService.java Wed Mar 10 12:06:32 2010
@@ -23,7 +23,6 @@ import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.click.extras.cayenne.CayenneTemplate;
 import org.apache.commons.lang.Validate;
 import org.quartz.JobDetail;
 import org.quartz.JobExecutionContext;
@@ -35,10 +34,8 @@ import org.quartz.impl.StdSchedulerFacto
 
 /**
  * Provides a service wrapper class around the Quartz scheduler class.
- *
- * @author Malcolm Edgar
  */
-public class SchedulerService extends CayenneTemplate {
+public class SchedulerService {
 
     /** The scheduler group name. */
     private static final String GROUP_NAME = "click-examples";



Mime
View raw message