click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r921323 [3/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/form/dynamic/DynamicFieldSet.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicFieldSet.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicFieldSet.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicFieldSet.java Wed Mar 10 12:06:32 2010
@@ -1,105 +1,111 @@
-/*
- * 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.form.dynamic;
-
-import org.apache.click.ActionListener;
-import org.apache.click.Control;
-import org.apache.click.control.Checkbox;
-import org.apache.click.control.FieldSet;
-import org.apache.click.control.Form;
-import org.apache.click.control.Submit;
-import org.apache.click.control.TextField;
-import org.apache.click.examples.page.BorderPage;
-import org.apache.click.extras.control.EmailField;
-import org.apache.click.extras.control.IntegerField;
-import org.apache.click.util.ClickUtils;
-
-/**
- * Demonstrates dynamic Form behavior.
- */
-public class DynamicFieldSet extends BorderPage {
-
-    private Form form = new Form("dynamicForm");
-
-    private FieldSet customerFS = new FieldSet("customer");
-
-    private FieldSet addressFS = new FieldSet("address");
-
-    private TextField nameField = new TextField("name", true);
-
-    private IntegerField ageField = new IntegerField("age");
-
-    private Checkbox addressChk = new Checkbox("address");
-
-    private EmailField emailField = new EmailField("email", true);
-
-    private Submit submit = new Submit("ok");
-
-    @Override
-    public void onInit() {
-        super.onInit();
-
-        form.add(customerFS);
-        customerFS.add(nameField);
-        customerFS.add(ageField);
-        customerFS.add(addressChk);
-
-        // The Click script, '/click/control.js', provides the JavaScript
-        // function Click.submit(formName, validate). To bypass validation
-        // specify 'false' as the second argument.
-        addressChk.setAttribute("onclick", "Click.submit(dynamicForm, false)");
-
-        form.add(submit);
-
-        addControl(form);
-
-        // NB: Bind and validate form fields *before* the onProcess event,
-        // enabling us to inspect Field values in the onInit event or even
-        // the Page constructor
-        boolean valid = ClickUtils.bindAndValidate(form);
-
-        // We can safely check whether the user checked the addressChk
-        if (addressChk.isChecked()) {
-            // Dynamically add a new Field and FieldSet to the form
-            addressFS.add(emailField);
-            form.add(addressFS);
-        }
-
-        form.setActionListener(new ActionListener() {
-            public boolean onAction(Control source) {
-                return onFormSubmit();
-            }
-        });
-    }
-
-    public boolean onFormSubmit() {
-        // onFormSubmit listens on Form itself and will be invoked whenever the
-        // form is submitted.
-        if (form.isValid()) {
-
-            // Check isBypassValidation() flag whether the form validation occurred
-            if (form.isBypassValidation()) {
-                addModel("msg", "Validation bypassed");
-            } else {
-                addModel("msg", "Form is valid after validation");
-            }
-        }
-        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.form.dynamic;
+
+import org.apache.click.ActionListener;
+import org.apache.click.Control;
+import org.apache.click.control.Checkbox;
+import org.apache.click.control.FieldSet;
+import org.apache.click.control.Form;
+import org.apache.click.control.Submit;
+import org.apache.click.control.TextField;
+import org.apache.click.examples.page.BorderPage;
+import org.apache.click.extras.control.EmailField;
+import org.apache.click.extras.control.IntegerField;
+import org.apache.click.util.ClickUtils;
+
+/**
+ * Demonstrates dynamic Form behavior.
+ */
+public class DynamicFieldSet extends BorderPage {
+
+    private static final long serialVersionUID = 1L;
+
+    private Form form = new Form("dynamicForm");
+
+    private FieldSet customerFS = new FieldSet("customer");
+
+    private FieldSet addressFS = new FieldSet("address");
+
+    private TextField nameField = new TextField("name", true);
+
+    private IntegerField ageField = new IntegerField("age");
+
+    private Checkbox addressChk = new Checkbox("address");
+
+    private EmailField emailField = new EmailField("email", true);
+
+    private Submit submit = new Submit("ok");
+
+    // Event Handlers ---------------------------------------------------------
+
+    @Override
+    public void onInit() {
+        super.onInit();
+
+        form.add(customerFS);
+        customerFS.add(nameField);
+        customerFS.add(ageField);
+        customerFS.add(addressChk);
+
+        // The Click script, '/click/control.js', provides the JavaScript
+        // function Click.submit(formName, validate). To bypass validation
+        // specify 'false' as the second argument.
+        addressChk.setAttribute("onclick", "Click.submit(dynamicForm, false)");
+
+        form.add(submit);
+
+        addControl(form);
+
+        // NB: Bind and validate form fields *before* the onProcess event,
+        // enabling us to inspect Field values in the onInit event or even
+        // the Page constructor
+        boolean valid = ClickUtils.bindAndValidate(form);
+
+        // We can safely check whether the user checked the addressChk
+        if (addressChk.isChecked()) {
+            // Dynamically add a new Field and FieldSet to the form
+            addressFS.add(emailField);
+            form.add(addressFS);
+        }
+
+        form.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
+            public boolean onAction(Control source) {
+                return onFormSubmit();
+            }
+        });
+    }
+
+    public boolean onFormSubmit() {
+        // onFormSubmit listens on Form itself and will be invoked whenever the
+        // form is submitted.
+        if (form.isValid()) {
+
+            // Check isBypassValidation() flag whether the form validation occurred
+            if (form.isBypassValidation()) {
+                addModel("msg", "Validation bypassed");
+            } else {
+                addModel("msg", "Form is valid after validation");
+            }
+        }
+        return true;
+    }
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicForm.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicForm.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicForm.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicForm.java Wed Mar 10 12:06:32 2010
@@ -1,95 +1,101 @@
-/*
- * 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.form.dynamic;
-
-import org.apache.click.ActionListener;
-import org.apache.click.Control;
-import org.apache.click.control.Checkbox;
-import org.apache.click.control.Form;
-import org.apache.click.control.Submit;
-import org.apache.click.control.TextField;
-import org.apache.click.examples.page.BorderPage;
-import org.apache.click.extras.control.EmailField;
-import org.apache.click.util.ClickUtils;
-
-/**
- * Demonstrates dynamic Form behavior.
- */
-public class DynamicForm extends BorderPage {
-
-    private Form form = new Form("dynamicForm");
-
-    private TextField nameField = new TextField("name", true);
-
-    private Checkbox checkbox = new Checkbox("subscribe");
-
-    private Submit submit = new Submit("ok");
-
-    @Override
-    public void onInit() {
-        super.onInit();
-
-        form.add(nameField);
-        form.add(checkbox);
-
-        // The Click script, '/click/control.js', provides the JavaScript
-        // function Click.submit(formName, validate). To bypass validation
-        // specify 'false' as the second argument.
-        checkbox.setAttribute("onclick", "Click.submit(dynamicForm, false)");
-
-        form.add(submit);
-
-        addControl(form);
-
-        // NB: Bind the checkbox *before* the onProcess event, enabling us to
-        // inspect the checkbox value inside the onInit event, or even the
-        // page constructor
-        ClickUtils.bind(checkbox);
-
-        // We could also bind *all* form fields in one go
-        // ClickUtils.bind(form);
-
-        // We can safely check whether the user checked the checkbox
-        if (checkbox.isChecked()) {
-            // Dynamically add the email Field to the form
-            form.add(new EmailField("email", true));
-        }
-
-        form.setActionListener(new ActionListener() {
-            public boolean onAction(Control source) {
-                return onFormSubmit();
-            }
-        });
-    }
-
-    public boolean onFormSubmit() {
-        // onFormSubmit listens on Form itself and will be invoked whenever the
-        // form is submitted.
-        if (form.isValid()) {
-
-            // Check isBypassValidation() flag whether the form validation occurred
-            if (form.isBypassValidation()) {
-                addModel("msg", "Validation was bypassed");
-            } else {
-                addModel("msg", "Form is valid after validation");
-            }
-        }
-        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.form.dynamic;
+
+import org.apache.click.ActionListener;
+import org.apache.click.Control;
+import org.apache.click.control.Checkbox;
+import org.apache.click.control.Form;
+import org.apache.click.control.Submit;
+import org.apache.click.control.TextField;
+import org.apache.click.examples.page.BorderPage;
+import org.apache.click.extras.control.EmailField;
+import org.apache.click.util.ClickUtils;
+
+/**
+ * Demonstrates dynamic Form behaviour.
+ */
+public class DynamicForm extends BorderPage {
+
+    private static final long serialVersionUID = 1L;
+
+    private Form form = new Form("dynamicForm");
+
+    private TextField nameField = new TextField("name", true);
+
+    private Checkbox checkbox = new Checkbox("subscribe");
+
+    private Submit submit = new Submit("ok");
+
+    // Event Handlers ---------------------------------------------------------
+
+    @Override
+    public void onInit() {
+        super.onInit();
+
+        form.add(nameField);
+        form.add(checkbox);
+
+        // The Click script, '/click/control.js', provides the JavaScript
+        // function Click.submit(formName, validate). To bypass validation
+        // specify 'false' as the second argument.
+        checkbox.setAttribute("onclick", "Click.submit(dynamicForm, false)");
+
+        form.add(submit);
+
+        addControl(form);
+
+        // NB: Bind the checkbox *before* the onProcess event, enabling us to
+        // inspect the checkbox value inside the onInit event, or even the
+        // page constructor
+        ClickUtils.bind(checkbox);
+
+        // We could also bind *all* form fields in one go
+        // ClickUtils.bind(form);
+
+        // We can safely check whether the user checked the checkbox
+        if (checkbox.isChecked()) {
+            // Dynamically add the email Field to the form
+            form.add(new EmailField("email", true));
+        }
+
+        form.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
+            public boolean onAction(Control source) {
+                return onFormSubmit();
+            }
+        });
+    }
+
+    public boolean onFormSubmit() {
+        // onFormSubmit listens on Form itself and will be invoked whenever the
+        // form is submitted.
+        if (form.isValid()) {
+
+            // Check isBypassValidation() flag whether the form validation occurred
+            if (form.isBypassValidation()) {
+                addModel("msg", "Validation was bypassed");
+            } else {
+                addModel("msg", "Form is valid after validation");
+            }
+        }
+        return true;
+    }
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicSelect.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicSelect.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicSelect.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/DynamicSelect.java Wed Mar 10 12:06:32 2010
@@ -1,102 +1,109 @@
-/*
- * 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.form.dynamic;
-
-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.Option;
-import org.apache.click.control.Select;
-import org.apache.click.control.Submit;
-import org.apache.click.control.TextField;
-import org.apache.click.examples.page.BorderPage;
-import org.apache.click.extras.control.DoubleField;
-import org.apache.click.util.ClickUtils;
-
-/**
- * Demonstrates dynamic Form behavior using a Select control.
- */
-public class DynamicSelect extends BorderPage {
-
-    private Form form = new Form("dynamicForm");
-
-    private TextField nameField = new TextField("name", true);
-
-    private Select select = new Select("investments", true);
-
-    private Submit submit = new Submit("ok");
-
-    // Investment options
-    private static final String PROPERTY = "Property";
-    private static final String STOCKS = "Stocks";
-    private static final String[] INVESTMENTS = {PROPERTY, STOCKS};
-
-    public DynamicSelect() {
-
-        form.setActionListener(new ActionListener() {
-
-            public boolean onAction(Control source) {
-                return onFormSubmit();
-            }
-        });
-
-        form.add(nameField);
-
-        select.add(Option.EMPTY_OPTION);
-        select.addAll(INVESTMENTS);
-        form.add(select);
-
-        // The Click script, '/click/control.js', provides the JavaScript
-        // function Click.submit(formName, validate). To bypass validation
-        // specify 'false' as the second argument.
-        select.setAttribute("onchange", "Click.submit(dynamicForm, false)");
-
-        form.add(submit);
-
-        addControl(form);
-
-        // Bind the form field request values
-        ClickUtils.bind(form);
-
-        if (STOCKS.equals(select.getValue())) {
-            form.add(new DoubleField("amount", true));
-        } else if (PROPERTY.equals(select.getValue())) {
-            FieldSet address = new FieldSet("address");
-            address.add(new TextField("street", true));
-            address.add(new DoubleField("amount", true));
-            form.add(address);
-        }
-    }
-
-    public boolean onFormSubmit() {
-        // onFormSubmit listens on Form itself and will be invoked whenever the
-        // form is submitted.
-        if (form.isValid()) {
-
-            // Check isBypassValidation() flag whether the form validation occurred
-            if (form.isBypassValidation()) {
-                addModel("msg", "Validation bypassed");
-            } else {
-                addModel("msg", "Form is valid after validation");
-            }
-        }
-        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.form.dynamic;
+
+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.Option;
+import org.apache.click.control.Select;
+import org.apache.click.control.Submit;
+import org.apache.click.control.TextField;
+import org.apache.click.examples.page.BorderPage;
+import org.apache.click.extras.control.DoubleField;
+import org.apache.click.util.ClickUtils;
+
+/**
+ * Demonstrates dynamic Form behaviour using a Select control.
+ */
+public class DynamicSelect extends BorderPage {
+
+    private static final long serialVersionUID = 1L;
+
+    private Form form = new Form("dynamicForm");
+
+    private TextField nameField = new TextField("name", true);
+
+    private Select select = new Select("investments", true);
+
+    private Submit submit = new Submit("ok");
+
+    // Investment options
+    private static final String PROPERTY = "Property";
+    private static final String STOCKS = "Stocks";
+    private static final String[] INVESTMENTS = {PROPERTY, STOCKS};
+
+    // Constructor ------------------------------------------------------------
+
+    public DynamicSelect() {
+
+        form.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
+            public boolean onAction(Control source) {
+                return onFormSubmit();
+            }
+        });
+
+        form.add(nameField);
+
+        select.add(Option.EMPTY_OPTION);
+        select.addAll(INVESTMENTS);
+        form.add(select);
+
+        // The Click script, '/click/control.js', provides the JavaScript
+        // function Click.submit(formName, validate). To bypass validation
+        // specify 'false' as the second argument.
+        select.setAttribute("onchange", "Click.submit(dynamicForm, false)");
+
+        form.add(submit);
+
+        addControl(form);
+
+        // Bind the form field request values
+        ClickUtils.bind(form);
+
+        if (STOCKS.equals(select.getValue())) {
+            form.add(new DoubleField("amount", true));
+        } else if (PROPERTY.equals(select.getValue())) {
+            FieldSet address = new FieldSet("address");
+            address.add(new TextField("street", true));
+            address.add(new DoubleField("amount", true));
+            form.add(address);
+        }
+    }
+
+    // Event Handlers ---------------------------------------------------------
+
+    public boolean onFormSubmit() {
+        // onFormSubmit listens on Form itself and will be invoked whenever the
+        // form is submitted.
+        if (form.isValid()) {
+
+            // Check isBypassValidation() flag whether the form validation occurred
+            if (form.isBypassValidation()) {
+                addModel("msg", "Validation bypassed");
+            } else {
+                addModel("msg", "Form is valid after validation");
+            }
+        }
+        return true;
+    }
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/PopulateOnSelect.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/PopulateOnSelect.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/PopulateOnSelect.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/PopulateOnSelect.java Wed Mar 10 12:06:32 2010
@@ -25,6 +25,7 @@ import java.util.Map;
 import org.apache.click.control.FieldSet;
 import org.apache.click.control.Select;
 import org.apache.click.control.Submit;
+import org.apache.click.element.Element;
 import org.apache.click.element.JsScript;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.extras.control.TabbedForm;
@@ -37,6 +38,8 @@ import org.apache.commons.lang.StringUti
  */
 public class PopulateOnSelect extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private static final String EASTERN_CAPE = "EC";
     private static final String FREE_STATE = "FS";
     private static final String GAUTENG_PROVINCE = "GP";
@@ -49,6 +52,8 @@ public class PopulateOnSelect extends Bo
     private Select suburb = new Select("suburb", true);
     private Submit save = new Submit("save");
 
+    // Event Handlers ---------------------------------------------------------
+
     @Override
     public void onInit() {
         super.onInit();
@@ -77,6 +82,8 @@ public class PopulateOnSelect extends Bo
         form.add(save);
     }
 
+    // Public Methods ---------------------------------------------------------
+
     public void buildSelects() {
         state.add("---");
         city.add("---");
@@ -106,11 +113,11 @@ public class PopulateOnSelect extends Bo
     }
 
     @Override
-    public List getHeadElements() {
+    public List<Element> getHeadElements() {
         if (headElements == null) {
             headElements = super.getHeadElements();
 
-            Map model = new HashMap();
+            Map<String, Object> model = new HashMap<String, Object>();
             model.put("stateId", state.getId());
             model.put("cityId", city.getId());
             model.put("suburbId", suburb.getId());
@@ -123,10 +130,11 @@ public class PopulateOnSelect extends Bo
         return headElements;
     }
 
-    // -------------------------------------------------------- Private Methods
+    // Private Methods --------------------------------------------------------
 
+    @SuppressWarnings("serial")
     private void populateStateData() {
-        Map map = new HashMap() {{
+        Map<String, String> map = new HashMap<String, String>() {{
                 put(EASTERN_CAPE, "Eastern Cape");
                 put(FREE_STATE, "Free State");
                 put(GAUTENG_PROVINCE, "Gauteng Province");

Added: click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/package.html
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/package.html?rev=921323&view=auto
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/package.html (added)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/dynamic/package.html Wed Mar 10 12:06:32 2010
@@ -0,0 +1,22 @@
+<!--
+   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.
+-->
+
+<body>
+Provides dynamic form example classes.
+</body>
\ No newline at end of file

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/ControlHeadDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/ControlHeadDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/ControlHeadDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/ControlHeadDemo.java Wed Mar 10 12:06:32 2010
@@ -1,106 +1,112 @@
-/*
- * 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.general;
-
-import java.util.List;
-import org.apache.click.control.Field;
-import org.apache.click.control.Form;
-import org.apache.click.control.Submit;
-import org.apache.click.element.CssImport;
-import org.apache.click.element.JsImport;
-import org.apache.click.examples.page.BorderPage;
-import org.apache.click.util.HtmlStringBuffer;
-
-/**
- * This example demonstrates how to manipulate the Head elements of a
- * custom StarRating Control.
- *
- * @author Bob Schellink
- */
-public class ControlHeadDemo extends BorderPage {
-
-    public ControlHeadDemo() {
-
-        Form form = new Form("form");
-
-        StarRating rating = new StarRating("rating", 5, 2);
-        form.add(rating);
-
-        form.add(new Submit("submit"));
-
-        addControl(form);
-    }
-
-    /**
-     * A custom StarRating Control based on the JQuery Rating plugin.
-     */
-    public class StarRating extends Field {
-
-        private int maxStars;
-
-        public StarRating(String name, int maxStars, int selectedValue) {
-            super(name);
-            this.maxStars = maxStars;
-            setValue(Integer.toString(selectedValue));
-        }
-
-        /**
-         * Return the list of HEAD elements.
-         *
-         * @return list the list of HEAD elements
-         */
-        public List getHeadElements() {
-            if (headElements == null) {
-                headElements = super.getHeadElements();
-
-                // Add the JQuery library to the control
-                headElements.add(new JsImport("/assets/js/jquery-1.3.2.js"));
-
-                // Add the Rating JavaScript library to the control
-                headElements.add(new JsImport("/assets/rating/jquery.rating.js"));
-
-                // Add the Rating Css to the control
-                headElements.add(new CssImport("/assets/rating/jquery.rating.css"));
-            }
-            return headElements;
-        }
-
-        /**
-         * Render the HTML representation of the StarRating control.
-         *
-         * @param buffer the buffer to render the output to
-         */
-        public void render(HtmlStringBuffer buffer) {
-            // Render a radio button for each star
-            for (int i = 1; i <= maxStars; i++) {
-                String strValue = Integer.toString(i);
-                buffer.elementStart("input");
-                buffer.appendAttribute("type", "radio");
-                buffer.appendAttribute("name", getName());
-                buffer.appendAttribute("value", strValue);
-                buffer.appendAttribute("class", "star");
-                if (strValue.equals(getValue())) {
-                    buffer.appendAttribute("checked", "checked");
-                }
-                buffer.elementEnd();
-                buffer.append("\n");
-            }
-        }
-    }
-}
+/*
+ * 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.general;
+
+import java.util.List;
+
+import org.apache.click.control.Field;
+import org.apache.click.control.Form;
+import org.apache.click.control.Submit;
+import org.apache.click.element.CssImport;
+import org.apache.click.element.Element;
+import org.apache.click.element.JsImport;
+import org.apache.click.examples.page.BorderPage;
+import org.apache.click.util.HtmlStringBuffer;
+
+/**
+ * This example demonstrates how to manipulate the Head elements of a
+ * custom StarRating Control.
+ */
+public class ControlHeadDemo extends BorderPage {
+
+    private static final long serialVersionUID = 1L;
+
+    public ControlHeadDemo() {
+
+        Form form = new Form("form");
+
+        StarRating rating = new StarRating("rating", 5, 2);
+        form.add(rating);
+
+        form.add(new Submit("submit"));
+
+        addControl(form);
+    }
+
+    /**
+     * A custom StarRating Control based on the JQuery Rating plugin.
+     */
+    public class StarRating extends Field {
+
+        private static final long serialVersionUID = 1L;
+
+        private int maxStars;
+
+        public StarRating(String name, int maxStars, int selectedValue) {
+            super(name);
+            this.maxStars = maxStars;
+            setValue(Integer.toString(selectedValue));
+        }
+
+        /**
+         * Return the list of HEAD elements.
+         *
+         * @return list the list of HEAD elements
+         */
+        @Override
+        public List<Element> getHeadElements() {
+            if (headElements == null) {
+                headElements = super.getHeadElements();
+
+                // Add the JQuery library to the control
+                headElements.add(new JsImport("/assets/js/jquery-1.3.2.js"));
+
+                // Add the Rating JavaScript library to the control
+                headElements.add(new JsImport("/assets/rating/jquery.rating.js"));
+
+                // Add the Rating Css to the control
+                headElements.add(new CssImport("/assets/rating/jquery.rating.css"));
+            }
+            return headElements;
+        }
+
+        /**
+         * Render the HTML representation of the StarRating control.
+         *
+         * @param buffer the buffer to render the output to
+         */
+        @Override
+        public void render(HtmlStringBuffer buffer) {
+            // Render a radio button for each star
+            for (int i = 1; i <= maxStars; i++) {
+                String strValue = Integer.toString(i);
+                buffer.elementStart("input");
+                buffer.appendAttribute("type", "radio");
+                buffer.appendAttribute("name", getName());
+                buffer.appendAttribute("value", strValue);
+                buffer.appendAttribute("class", "star");
+                if (strValue.equals(getValue())) {
+                    buffer.appendAttribute("checked", "checked");
+                }
+                buffer.elementEnd();
+                buffer.append("\n");
+            }
+        }
+    }
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/DirectPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/DirectPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/DirectPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/DirectPage.java Wed Mar 10 12:06:32 2010
@@ -32,11 +32,11 @@ import org.apache.click.util.ClickUtils;
 
 /**
  * Provides a example direct <tt>HttpServletResponse</tt> handling.
- *
- * @author Malcolm Edgar
  */
 public class DirectPage extends Page {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * Render the Java source file as "text/plain".
      *

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java Wed Mar 10 12:06:32 2010
@@ -45,12 +45,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides a Excel Export page example using the Apache POI library.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class ExcelExportPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Resource(name="customerService")
     private CustomerService customerService;
 
@@ -62,6 +62,8 @@ public class ExcelExportPage extends Bor
 
         ActionLink link = new ActionLink("export");
         link.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 export();
                 return false;
@@ -115,6 +117,7 @@ public class ExcelExportPage extends Bor
 
     // -------------------------------------------------------- Private Methods
 
+    @SuppressWarnings("deprecation")
     private HSSFWorkbook createWorkbook() {
         HSSFWorkbook wb = new HSSFWorkbook();
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelTableExportPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelTableExportPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelTableExportPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelTableExportPage.java Wed Mar 10 12:06:32 2010
@@ -1,150 +1,152 @@
-/*
- * 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.general;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-
-import org.apache.click.Page;
-import org.apache.click.control.AbstractLink;
-import org.apache.click.control.Column;
-import org.apache.click.control.PageLink;
-import org.apache.click.control.Table;
-import org.apache.click.examples.control.exporter.ExcelTableExporter;
-import org.apache.click.examples.control.exporter.ExportTable;
-import org.apache.click.examples.domain.Customer;
-import org.apache.click.examples.page.BorderPage;
-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.extras.control.TableInlinePaginator;
-import org.springframework.stereotype.Component;
-
-/**
- * Provides a Excel Export page example using the Apache POI library.
- */
-@Component
-public class ExcelTableExportPage extends BorderPage {
-
-    private static final String ACTION_COLUMN = "action";
-
-    private ExportTable table1 = new ExportTable("table1");
-    private ExportTable table2 = new ExportTable("table2");
-    private ExportTable table3 = new ExportTable("table3");
-
-    private PageLink editLink = new PageLink("Edit", EditCustomer.class);
-
-    @Resource(name="customerService")
-    private CustomerService customerService;
-
-    // ------------------------------------------------------------ Constructor
-
-    public ExcelTableExportPage() {
-        addColumns(table1);
-        addColumns(table2);
-        addColumns(table3);
-
-        setupExporter(table1);
-        table1.setExportAttachment(ExportTable.EXPORTER_ATTACHED);
-
-        setupExporter(table2);
-        table2.setExportAttachment(ExportTable.EXPORTER_DETACHED);
-
-        setupExporter(table3);
-        table3.setExportAttachment(ExportTable.EXPORTER_INLINE);
-
-        addControl(table1);
-        addControl(table2);
-        addControl(table3);
-        addControl(editLink);
-    }
-
-    // --------------------------------------------------------- Event Handlers
-
-    /**
-     * @see Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        List<Customer> customers = customerService.getCustomersSortedByName(10);
-        table1.setRowList(customers);
-        table2.setRowList(customers);
-        table3.setRowList(customers);
-    }
-
-    // -------------------------------------------------------- Private Methods
-
-    private void setupExporter(ExportTable table) {
-        // Setup table exporting
-        ExcelTableExporter excel = new ExcelTableExporter("Excel", "/assets/images/page_excel.png");
-        table.getExportContainer().add(excel);
-
-        // Excluding the action column ensures the actions are not exported to
-        // Excel
-        table.getExcludedExportColumns().add(ACTION_COLUMN);
-    }
-
-    private void addColumns(ExportTable table) {
-        table.setSortable(true);
-        table.setClass(Table.CLASS_ITS);
-
-        // Setup table paginator
-        table.setPageSize(4);
-        table.setPaginator(new TableInlinePaginator(table));
-        table.setPaginatorAttachment(ExportTable.PAGINATOR_INLINE);
-
-        Column column = new Column(Customer.NAME_PROPERTY);
-        column.setWidth("140px;");
-        table.addColumn(column);
-
-        column = new Column(Customer.EMAIL_PROPERTY);
-        column.setAutolink(true);
-        column.setWidth("230px;");
-        table.addColumn(column);
-
-        column = new Column(Customer.AGE_PROPERTY);
-        column.setTextAlign("center");
-        column.setWidth("40px;");
-        table.addColumn(column);
-
-        column = new Column(Customer.HOLDINGS_PROPERTY);
-        column.setFormat("{0,number,currency}");
-        column.setTextAlign("right");
-        column.setWidth("100px;");
-        table.addColumn(column);
-
-        column = new Column(Customer.DATE_JOINED_PROPERTY);
-        column.setFormat("{0,date,medium}");
-        column.setWidth("100px;");
-        table.addColumn(column);
-
-        // Excluding the dateJoined column ensures the date is not shown in the
-        // HTML table, but will be exported to the Excel spreadsheet
-        table.getExcludedColumns().add(Customer.DATE_JOINED_PROPERTY);
-
-        column = new Column(ACTION_COLUMN);
-        AbstractLink[] links = new AbstractLink[] { editLink };
-        editLink.setParameter("referrer", "/general/excel-table-export.htm");
-        column.setDecorator(new LinkDecorator(table, links, "id"));
-        column.setSortable(false);
-        table.addColumn(column);
-    }
-}
+/*
+ * 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.general;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.apache.click.Page;
+import org.apache.click.control.AbstractLink;
+import org.apache.click.control.Column;
+import org.apache.click.control.PageLink;
+import org.apache.click.control.Table;
+import org.apache.click.examples.control.exporter.ExcelTableExporter;
+import org.apache.click.examples.control.exporter.ExportTable;
+import org.apache.click.examples.domain.Customer;
+import org.apache.click.examples.page.BorderPage;
+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.extras.control.TableInlinePaginator;
+import org.springframework.stereotype.Component;
+
+/**
+ * Provides a Excel Export page example using the Apache POI library.
+ */
+@Component
+public class ExcelTableExportPage extends BorderPage {
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String ACTION_COLUMN = "action";
+
+    private ExportTable table1 = new ExportTable("table1");
+    private ExportTable table2 = new ExportTable("table2");
+    private ExportTable table3 = new ExportTable("table3");
+
+    private PageLink editLink = new PageLink("Edit", EditCustomer.class);
+
+    @Resource(name="customerService")
+    private CustomerService customerService;
+
+    // Constructor ------------------------------------------------------------
+
+    public ExcelTableExportPage() {
+        addColumns(table1);
+        addColumns(table2);
+        addColumns(table3);
+
+        setupExporter(table1);
+        table1.setExportAttachment(ExportTable.EXPORTER_ATTACHED);
+
+        setupExporter(table2);
+        table2.setExportAttachment(ExportTable.EXPORTER_DETACHED);
+
+        setupExporter(table3);
+        table3.setExportAttachment(ExportTable.EXPORTER_INLINE);
+
+        addControl(table1);
+        addControl(table2);
+        addControl(table3);
+        addControl(editLink);
+    }
+
+    // Event Handlers ---------------------------------------------------------
+
+    /**
+     * @see Page#onRender()
+     */
+    @Override
+    public void onRender() {
+        List<Customer> customers = customerService.getCustomersSortedByName(10);
+        table1.setRowList(customers);
+        table2.setRowList(customers);
+        table3.setRowList(customers);
+    }
+
+    //  Private Methods --------------------------------------------------------
+
+    private void setupExporter(ExportTable table) {
+        // Setup table exporting
+        ExcelTableExporter excel = new ExcelTableExporter("Excel", "/assets/images/page_excel.png");
+        table.getExportContainer().add(excel);
+
+        // Excluding the action column ensures the actions are not exported to
+        // Excel
+        table.getExcludedExportColumns().add(ACTION_COLUMN);
+    }
+
+    private void addColumns(ExportTable table) {
+        table.setSortable(true);
+        table.setClass(Table.CLASS_ITS);
+
+        // Setup table paginator
+        table.setPageSize(4);
+        table.setPaginator(new TableInlinePaginator(table));
+        table.setPaginatorAttachment(ExportTable.PAGINATOR_INLINE);
+
+        Column column = new Column(Customer.NAME_PROPERTY);
+        column.setWidth("140px;");
+        table.addColumn(column);
+
+        column = new Column(Customer.EMAIL_PROPERTY);
+        column.setAutolink(true);
+        column.setWidth("230px;");
+        table.addColumn(column);
+
+        column = new Column(Customer.AGE_PROPERTY);
+        column.setTextAlign("center");
+        column.setWidth("40px;");
+        table.addColumn(column);
+
+        column = new Column(Customer.HOLDINGS_PROPERTY);
+        column.setFormat("{0,number,currency}");
+        column.setTextAlign("right");
+        column.setWidth("100px;");
+        table.addColumn(column);
+
+        column = new Column(Customer.DATE_JOINED_PROPERTY);
+        column.setFormat("{0,date,medium}");
+        column.setWidth("100px;");
+        table.addColumn(column);
+
+        // Excluding the dateJoined column ensures the date is not shown in the
+        // HTML table, but will be exported to the Excel spreadsheet
+        table.getExcludedColumns().add(Customer.DATE_JOINED_PROPERTY);
+
+        column = new Column(ACTION_COLUMN);
+        AbstractLink[] links = new AbstractLink[] { editLink };
+        editLink.setParameter("referrer", "/general/excel-table-export.htm");
+        column.setDecorator(new LinkDecorator(table, links, "id"));
+        column.setSortable(false);
+        table.addColumn(column);
+    }
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/ExceptionPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/ExceptionPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/ExceptionPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/ExceptionPage.java Wed Mar 10 12:06:32 2010
@@ -28,6 +28,8 @@ import org.apache.click.util.Bindable;
  */
 public class ExceptionPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected ActionLink nullPointerLink = new ActionLink(this, "onNullPointerClick");
     @Bindable protected ActionLink illegalArgumentLink = new ActionLink(this, "onIllegalArgumentExceptionClick");
     @Bindable protected ActionLink missingMethodLink = new ActionLink(this, "onMissingMethodClick");
@@ -37,6 +39,9 @@ public class ExceptionPage extends Borde
 
     private String template;
 
+    // Event Handlers ---------------------------------------------------------
+
+    @SuppressWarnings("null")
     public boolean onNullPointerClick() {
         Object object = null;
         object.hashCode();
@@ -65,6 +70,8 @@ public class ExceptionPage extends Borde
         return true;
     }
 
+    // Public Methods ---------------------------------------------------------
+
     /**
      * Override getTemplate so we can stuff things up.
      *
@@ -75,11 +82,11 @@ public class ExceptionPage extends Borde
         return (template != null) ? template : super.getTemplate();
     }
 
+    // Inner Classes ----------------------------------------------------------
+
     /**
      * Provides a rendering ojbect which will throw a NPE when merged by
      * velocity in the template.
-     *
-     * @author Malcolm Edgar
      */
     public static class BrokenRenderer {
 
@@ -88,6 +95,7 @@ public class ExceptionPage extends Borde
          *
          * @see Object#toString()
          */
+        @SuppressWarnings("null")
         public String toString() {
             Object object = null;
             return object.toString();

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/FlashPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/FlashPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/FlashPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/FlashPage.java Wed Mar 10 12:06:32 2010
@@ -27,11 +27,11 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides an example of a flash session attribute.
- *
- * @author Malcolm Edgar
  */
 public class FlashPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
 
     private TextField valueField = new TextField("value", "Value:", true);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationA.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationA.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationA.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationA.java Wed Mar 10 12:06:32 2010
@@ -25,17 +25,17 @@ import org.apache.click.util.Bindable;
 /**
  * Provides an navigation example Page demonstrating forward and redirect
  * page navigation.
- *
- * @author Malcolm Edgar
  */
 public class NavigationA extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected ActionLink forwardLink = new ActionLink("forwardLink", this, "onForwardClick");
     @Bindable protected ActionLink forwardParamLink = new ActionLink("forwardParamLink", this, "onForwardParamClick");
     @Bindable protected ActionLink redirectLink = new ActionLink("redirectLink", this, "onRedirectClick");
     @Bindable protected ActionLink redirectParamLink = new ActionLink("redirectParamLink", this, "onRedirectParamClick");
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -90,7 +90,7 @@ public class NavigationA extends BorderP
         return false;
     }
 
-    // --------------------------------------------------------- Public Methods
+    // Public Methods ---------------------------------------------------------
 
     public String getTarget() {
         return "/general/navigation-b.htm";

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationB.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationB.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationB.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/NavigationB.java Wed Mar 10 12:06:32 2010
@@ -21,11 +21,11 @@ package org.apache.click.examples.page.g
 /**
  * Provides an navigation example Page demonstrating forward and redirect
  * page navigation. See NavigationA page for details.
- *
- * @author Malcolm Edgar
  */
 public class NavigationB extends NavigationA {
 
+    private static final long serialVersionUID = 1L;
+
     @Override
     public String getTarget() {
         return "/general/navigation-a.htm";

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/PageHeadDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/PageHeadDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/PageHeadDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/PageHeadDemo.java Wed Mar 10 12:06:32 2010
@@ -1,89 +1,96 @@
-/*
- * 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.general;
-
-import java.util.List;
-import java.util.Map;
-import org.apache.click.Context;
-import org.apache.click.control.ActionLink;
-import org.apache.click.control.Field;
-import org.apache.click.control.TextField;
-import org.apache.click.element.CssImport;
-import org.apache.click.element.CssStyle;
-import org.apache.click.element.JsImport;
-import org.apache.click.element.JsScript;
-import org.apache.click.examples.page.BorderPage;
-import org.apache.click.util.ClickUtils;
-
-/**
- * This example demonstrates how to manipulate the Head elements of a Page.
- *
- * @author Bob Schellink
- */
-public class PageHeadDemo extends BorderPage {
-
-    private ActionLink link;
-    private Field field;
-
-    public PageHeadDemo() {
-        // When this link is clicked it will toggle the Field's disabled attribute
-        link = new ActionLink("link", "Hide");
-        link.setId("link-id");
-
-         // Create a new TextField and add it the Page controls
-        field = new TextField("field");
-
-        addControl(link);
-        addControl(field);
-    }
-
-    /**
-     * Return the Page list of HEAD elements.
-     *
-     * @return the Page list of HEAD elements
-     */
-    public List getHeadElements() {
-        if (headElements == null) {
-            headElements = super.getHeadElements();
-
-            // Add a Css import to the Page
-            headElements.add(new CssImport("/general/page-head-demo.css"));
-
-            // Add inline Css content to the Page that increases the field font-size
-            headElements.add(new CssStyle("#" + field.getId() + " { font-size: 18px; }"));
-
-            // Add the JQuery library to the Page
-            headElements.add(new JsImport("/assets/js/jquery-1.3.2.js"));
-
-            // Add a JQuery template which adds a 'click' listener to the link
-            // that will show/hide the field
-            Context context = getContext();
-
-            // Create a template model and pass in the linkId
-            Map jsModel = ClickUtils.createTemplateModel(this, context);
-            jsModel.put("linkId", '#' + link.getId());
-
-            String content =
-                context.renderTemplate("/general/page-head-demo.js", jsModel);
-
-            headElements.add(new JsScript(content));
-        }
-        return headElements;
-    }
-}
+/*
+ * 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.general;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.click.Context;
+import org.apache.click.control.ActionLink;
+import org.apache.click.control.Field;
+import org.apache.click.control.TextField;
+import org.apache.click.element.CssImport;
+import org.apache.click.element.CssStyle;
+import org.apache.click.element.Element;
+import org.apache.click.element.JsImport;
+import org.apache.click.element.JsScript;
+import org.apache.click.examples.page.BorderPage;
+import org.apache.click.util.ClickUtils;
+
+/**
+ * This example demonstrates how to manipulate the Head elements of a Page.
+ */
+public class PageHeadDemo extends BorderPage {
+
+    private static final long serialVersionUID = 1L;
+
+    private ActionLink link;
+    private Field field;
+
+    // Constructor ------------------------------------------------------------
+
+    public PageHeadDemo() {
+        // When this link is clicked it will toggle the Field's disabled attribute
+        link = new ActionLink("link", "Hide");
+        link.setId("link-id");
+
+         // Create a new TextField and add it the Page controls
+        field = new TextField("field");
+
+        addControl(link);
+        addControl(field);
+    }
+
+    // Public Methods ---------------------------------------------------------
+
+    /**
+     * Return the Page list of HEAD elements.
+     *
+     * @return the Page list of HEAD elements
+     */
+    @Override
+    public List<Element> getHeadElements() {
+        if (headElements == null) {
+            headElements = super.getHeadElements();
+
+            // Add a Css import to the Page
+            headElements.add(new CssImport("/general/page-head-demo.css"));
+
+            // Add inline Css content to the Page that increases the field font-size
+            headElements.add(new CssStyle("#" + field.getId() + " { font-size: 18px; }"));
+
+            // Add the JQuery library to the Page
+            headElements.add(new JsImport("/assets/js/jquery-1.3.2.js"));
+
+            // Add a JQuery template which adds a 'click' listener to the link
+            // that will show/hide the field
+            Context context = getContext();
+
+            // Create a template model and pass in the linkId
+            Map jsModel = ClickUtils.createTemplateModel(this, context);
+            jsModel.put("linkId", '#' + link.getId());
+
+            String content =
+                context.renderTemplate("/general/page-head-demo.js", jsModel);
+
+            headElements.add(new JsScript(content));
+        }
+        return headElements;
+    }
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/PageImportsExample.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/PageImportsExample.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/PageImportsExample.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/PageImportsExample.java Wed Mar 10 12:06:32 2010
@@ -19,7 +19,9 @@
 package org.apache.click.examples.page.general;
 
 import java.util.List;
+
 import org.apache.click.element.CssImport;
+import org.apache.click.element.Element;
 import org.apache.click.element.JsImport;
 import org.apache.click.element.JsScript;
 import org.apache.click.examples.page.BorderPage;
@@ -35,6 +37,8 @@ import org.apache.click.examples.page.Bo
  */
 public class PageImportsExample extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     public PageImportsExample() {
         // Indicate that Controls should not import their head elements
         setIncludeControlHeadElements(false);
@@ -46,7 +50,7 @@ public class PageImportsExample extends 
      * @return the list of Page HEAD elements
      */
     @Override
-    public List getHeadElements() {
+    public List<Element> getHeadElements() {
         if (headElements == null) {
             headElements = super.getHeadElements();
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java Wed Mar 10 12:06:32 2010
@@ -39,12 +39,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides an advanced form example.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class AdvancedForm extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
     @Bindable protected String msg;
 
@@ -53,7 +53,7 @@ public class AdvancedForm extends Border
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public AdvancedForm() {
         FieldSet fieldSet = new FieldSet("Customer");
@@ -75,7 +75,7 @@ public class AdvancedForm extends Border
         form.add(new Submit("cancel", this, "onCancelClicked"));
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see Page#onInit()

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedTable.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedTable.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedTable.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedTable.java Wed Mar 10 12:06:32 2010
@@ -20,17 +20,18 @@ package org.apache.click.examples.page.i
 
 import java.util.List;
 
-import org.apache.click.Page;
 import org.apache.click.control.AbstractLink;
 import org.apache.click.control.ActionLink;
 import org.apache.click.control.Column;
 import org.apache.click.control.PageLink;
 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.page.EditCustomer;
 import org.apache.click.examples.service.CustomerService;
 import org.apache.click.extras.control.LinkDecorator;
 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;
@@ -40,8 +41,6 @@ import org.springframework.context.Appli
  * <p/>
  * This example also demonstrates how a stateful Page can be used to preserve
  * the Table sort and paging state while editing customers.
- *
- * @author Malcolm Edgar
  */
 public class AdvancedTable extends BorderPage implements ApplicationContextAware {
 
@@ -57,7 +56,7 @@ public class AdvancedTable extends Borde
      */
     private transient ApplicationContext applicationContext;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public AdvancedTable() {
         // Set Page to stateful to preserve Table sort and paging state while editing customers
@@ -93,9 +92,15 @@ public class AdvancedTable extends Borde
         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();
+            }
+        });
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     public boolean onDeleteClick() {
         Integer id = deleteLink.getValueInteger();
@@ -103,14 +108,7 @@ public class AdvancedTable extends Borde
         return true;
     }
 
-    /**
-     * @see Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        List list = getCustomerService().getCustomers();
-        table.setRowList(list);
-    }
+    // Public Methods ---------------------------------------------------------
 
     /**
      * Return CustomerService instance from Spring application context.

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType1Page.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType1Page.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType1Page.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType1Page.java Wed Mar 10 12:06:32 2010
@@ -29,17 +29,17 @@ import org.apache.click.util.Bindable;
  * The advantage of this control listener binding style is
  * that you write less lines of code, the disadvantage is that there is no
  * compile time checking.
- *
- * @author Malcolm Edgar
  */
 public class ControlListenerType1Page extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     /* Set the listener to this object's "onLinkClick" method. */
     @Bindable protected ActionLink myLink = new ActionLink(this, "onLinkClick");
 
     @Bindable protected String msg;
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * Handle the ActionLink control click event.

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType2Page.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType2Page.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType2Page.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/introduction/ControlListenerType2Page.java Wed Mar 10 12:06:32 2010
@@ -31,22 +31,24 @@ import org.apache.click.util.Bindable;
  * The advantage of this control listener binding style is you get compile
  * time safety and compiler refactoring support, the disadvantage is that you
  * have to write more lines of code.
- *
- * @author Malcolm Edgar
  */
 public class ControlListenerType2Page extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected ActionLink myLink = new ActionLink();
 
     @Bindable protected String msg;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     /**
      * Create a new Page instance.
      */
     public ControlListenerType2Page() {
         myLink.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control control) {
                  msg = "ControlListenerPage#" + hashCode()
                  + " object method <tt>onAction()</tt> invoked.";

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/introduction/HelloWorld.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/HelloWorld.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/introduction/HelloWorld.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/introduction/HelloWorld.java Wed Mar 10 12:06:32 2010
@@ -28,11 +28,11 @@ import org.apache.click.examples.page.Bo
  * <p/>
  * Note the public scope time Date field is automatically added to the page's
  * model as a value named "time".
- *
- * @author Malcolm Edgar
  */
 public class HelloWorld extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private Date time = new Date();
 
     public HelloWorld() {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleForm.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleForm.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleForm.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleForm.java Wed Mar 10 12:06:32 2010
@@ -33,15 +33,15 @@ import org.apache.click.util.Bindable;
  * <p/>
  * The form <tt>onSubmit</tt> control listener is invoked when the submit button
  * is clicked.
- *
- * @author Malcolm Edgar
  */
 public class SimpleForm extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
     @Bindable protected String msg;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public SimpleForm() {
         form.add(new TextField("name", true));
@@ -50,7 +50,7 @@ public class SimpleForm extends BorderPa
         form.setListener(this, "onSubmit");
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * Handle the form submit event.

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleTablePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleTablePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleTablePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/introduction/SimpleTablePage.java Wed Mar 10 12:06:32 2010
@@ -22,47 +22,44 @@ import java.util.List;
 
 import javax.annotation.Resource;
 
-import org.apache.click.Page;
 import org.apache.click.control.Column;
 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;
 
 /**
  * Provides an simple Table usage example Page.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class SimpleTablePage extends BorderPage {
 
-    @Bindable protected Table table = new Table();
+    private static final long serialVersionUID = 1L;
 
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public SimpleTablePage() {
+        Table table = new Table("table");
+
         table.setClass(Table.CLASS_ITS);
 
         table.addColumn(new Column("id"));
         table.addColumn(new Column("name"));
         table.addColumn(new Column("email"));
         table.addColumn(new Column("investments"));
-    }
 
-    // --------------------------------------------------------- Event Handlers
+        table.setDataProvider(new DataProvider<Customer>() {
+            public List<Customer> getData() {
+                return customerService.getCustomersSortedByName(10);
+            }
+        });
 
-    /**
-     * @see Page#onRender()
-     */
-    @Override
-    public void onRender() {
-        List<Customer> list = customerService.getCustomersSortedByName(10);
-        table.setRowList(list);
+        addControl(table);
     }
+
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/jsp/CustomerTable.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/CustomerTable.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/jsp/CustomerTable.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/jsp/CustomerTable.java Wed Mar 10 12:06:32 2010
@@ -22,6 +22,7 @@ import java.util.List;
 
 import javax.annotation.Resource;
 
+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;
@@ -30,17 +31,19 @@ import org.springframework.stereotype.Co
 /**
  * Provides JSP Page example where a JSP page and JSP border template is used to
  * render a table.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class CustomerTable extends BorderPage {
 
-    @Bindable protected List customers = null;
+    private static final long serialVersionUID = 1L;
+
+    @Bindable protected List<Customer> customers = null;
 
     @Resource(name="customerService")
     private CustomerService customerService;
 
+    // Event Handlers ---------------------------------------------------------
+
     /**
      * @see org.apache.click.Page#onRender()
      */
@@ -49,6 +52,8 @@ public class CustomerTable extends Borde
         customers = customerService.getCustomersSortedByName(10);
     }
 
+    // Public Methods ---------------------------------------------------------
+
     /**
      * Returns the name of the border template: &nbsp; <tt>"/border-template.jsp"</tt>
      *

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/jsp/EditCustomerPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/EditCustomerPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/jsp/EditCustomerPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/jsp/EditCustomerPage.java Wed Mar 10 12:06:32 2010
@@ -30,13 +30,15 @@ import org.apache.click.util.Bindable;
 
 /**
  * Demo a form submit using JSP as template.
- *
- * @author Bob Schellink
  */
 public class EditCustomerPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form("form");
 
+    // Constructor ------------------------------------------------------------
+
     public EditCustomerPage() {
         // Setup customers form
         FieldSet fieldSet = new FieldSet("customer");
@@ -49,21 +51,13 @@ public class EditCustomerPage extends Bo
         form.add(new Submit("cancel", this, "onCancelClick"));
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     @Override
     public boolean onSecurityCheck() {
         return form.onSubmitCheck(this, EditCustomerPage.class);
     }
 
-    /**
-     * Returns the name of the border template: &nbsp; <tt>"/border-template.jsp"</tt>
-     *
-     * @see org.apache.click.Page#getTemplate()
-     */
-    @Override
-    public String getTemplate() {
-        return "/border-template.jsp";
-    }
-
     public boolean onSaveClick() {
         if (form.isValid()) {
             // Perform logic
@@ -78,4 +72,16 @@ public class EditCustomerPage extends Bo
         form.clearValues();
         return true;
     }
+
+    // Public Methods ---------------------------------------------------------
+
+    /**
+     * Returns the name of the border template: &nbsp; <tt>"/border-template.jsp"</tt>
+     *
+     * @see org.apache.click.Page#getTemplate()
+     */
+    @Override
+    public String getTemplate() {
+        return "/border-template.jsp";
+    }
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/jsp/HelloWorld.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/HelloWorld.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/jsp/HelloWorld.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/jsp/HelloWorld.java Wed Mar 10 12:06:32 2010
@@ -29,11 +29,11 @@ import org.apache.click.util.Bindable;
  * <p/>
  * Note the public scope time Date field is automatically added to the page's
  * model as a value named "time".
- *
- * @author Malcolm Edgar
  */
 public class HelloWorld extends Page {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Date time = new Date();
 
 }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/jsp/MultiPathDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/MultiPathDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/jsp/MultiPathDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/jsp/MultiPathDemo.java Wed Mar 10 12:06:32 2010
@@ -24,11 +24,12 @@ import org.apache.click.examples.page.Bo
 import org.apache.click.util.Bindable;
 
 /**
- *
- * @author Bob Schellink
+ * Provides a multiple JSP page path example class.
  */
 public class MultiPathDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected ActionLink changePath = new ActionLink("changePath", this, "changePath");
 
     @Bindable protected PageLink defaultPath = new PageLink("defaultPath", MultiPathDemo.class);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationA.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationA.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationA.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationA.java Wed Mar 10 12:06:32 2010
@@ -25,17 +25,17 @@ import org.apache.click.util.Bindable;
 /**
  * Provides an navigation example Page demonstrating forward and redirect
  * page navigation.
- *
- * @author Malcolm Edgar
  */
 public class NavigationA extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected ActionLink forwardLink = new ActionLink("forwardLink", this, "onForwardClick");
     @Bindable protected ActionLink forwardParamLink = new ActionLink("forwardParamLink", this, "onForwardParamClick");
     @Bindable protected ActionLink redirectLink = new ActionLink("redirectLink", this, "onRedirectClick");
     @Bindable protected ActionLink redirectParamLink = new ActionLink("redirectParamLink", this, "onRedirectParamClick");
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -90,7 +90,7 @@ public class NavigationA extends BorderP
         return false;
     }
 
-    // --------------------------------------------------------- Public Methods
+    // Public Methods ---------------------------------------------------------
 
     /**
      * Target template to forward to.

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationB.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationB.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationB.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/jsp/NavigationB.java Wed Mar 10 12:06:32 2010
@@ -21,11 +21,11 @@ package org.apache.click.examples.page.j
 /**
  * Provides an navigation example Page demonstrating forward and redirect
  * page navigation. See NavigationA page for details.
- *
- * @author Malcolm Edgar
  */
 public class NavigationB extends NavigationA {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * Target template to forward to.
      * <p/>

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/LastPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/LastPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/LastPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/pageflow/LastPage.java Wed Mar 10 12:06:32 2010
@@ -29,12 +29,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides the last page of a multi page work flow.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class LastPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Resource(name="bookingService")
     private BookingService bookingService;
 



Mime
View raw message