click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r921323 [2/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/domain/Student.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/domain/Student.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/domain/Student.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/domain/Student.java Wed Mar 10 12:06:32 2010
@@ -1,25 +1,30 @@
-/*
- * 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.domain;
-
-import org.apache.click.examples.domain.auto._Student;
-
-public class Student extends _Student {
-
-}
+/*
+ * 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.domain;
+
+import org.apache.click.examples.domain.auto._Student;
+
+/**
+ * Provides an Client entity class.
+ */
+public class Student extends _Student {
+
+    private static final long serialVersionUID = 1L;
+
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/domain/StudentHouse.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/domain/StudentHouse.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/domain/StudentHouse.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/domain/StudentHouse.java Wed Mar 10 12:06:32 2010
@@ -1,25 +1,30 @@
-/*
- * 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.domain;
-
-import org.apache.click.examples.domain.auto._StudentHouse;
-
-public class StudentHouse extends _StudentHouse {
-
-}
+/*
+ * 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.domain;
+
+import org.apache.click.examples.domain.auto._StudentHouse;
+
+/**
+ * Provides an StudentHouse entity class.
+ */
+public class StudentHouse extends _StudentHouse {
+
+    private static final long serialVersionUID = 1L;
+
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/domain/SystemCode.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/domain/SystemCode.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/domain/SystemCode.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/domain/SystemCode.java Wed Mar 10 12:06:32 2010
@@ -22,8 +22,6 @@ import org.apache.click.examples.domain.
 
 /**
  * Provides an SystemCode entity class.
- *
- * @author Malcolm Edgar
  */
 public class SystemCode extends _SystemCode {
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/domain/User.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/domain/User.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/domain/User.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/domain/User.java Wed Mar 10 12:06:32 2010
@@ -22,8 +22,6 @@ import org.apache.click.examples.domain.
 
 /**
  * Provides an User entity class.
- *
- * @author Malcolm Edgar
  */
 public class User extends _User {
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/interceptor/ProfilingInterceptor.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/interceptor/ProfilingInterceptor.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/interceptor/ProfilingInterceptor.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/interceptor/ProfilingInterceptor.java Wed Mar 10 12:06:32 2010
@@ -77,7 +77,7 @@ public class ProfilingInterceptor implem
 
         LogService logService = ClickUtils.getLogService();
         if (logService.isInfoEnabled()) {
-            logService.info(this);
+//            logService.info(this);
         }
     }
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/BorderPage.java Wed Mar 10 12:06:32 2010
@@ -30,18 +30,18 @@ import org.apache.click.util.ClickUtils;
  * Please note this page is designed for extending by Page subclasses and will
  * not be auto mapped as the template name <tt>"border-template.htm"</tt> does
  * not match the Pages class name <tt>BorderPage</tt>.
- *
- * @author Malcolm Edgar
  */
 public class BorderPage extends Page {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * The root menu. Note this transient variable is reinitialized in onInit()
      * to support serialized stateful pages.
      */
     private transient Menu rootMenu;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     /**
      * Create a BorderedPage and set the model attributes <tt>$title</tt> and
@@ -62,7 +62,7 @@ public class BorderPage extends Page {
         addModel("srcPath", srcPath);
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -89,7 +89,7 @@ public class BorderPage extends Page {
         }
     }
 
-    // --------------------------------------------------------- Public Methods
+    // Public Methods ---------------------------------------------------------
 
     /**
      * Returns the name of the border template: &nbsp; <tt>"/border-template.htm"</tt>

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/EditCustomer.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/EditCustomer.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/EditCustomer.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/EditCustomer.java Wed Mar 10 12:06:32 2010
@@ -49,6 +49,8 @@ import org.springframework.stereotype.Co
 @Component
 public class EditCustomer extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private Form form = new Form("form");
     private HiddenField referrerField = new HiddenField("referrer", String.class);
     private HiddenField idField = new HiddenField("id", Integer.class);
@@ -60,6 +62,8 @@ public class EditCustomer extends Border
     @Resource(name="customerService")
     private CustomerService customerService;
 
+    // Constructor -----------------------------------------------------------
+
     public EditCustomer() {
         addControl(form);
 
@@ -95,6 +99,8 @@ public class EditCustomer extends Border
         form.add(new Submit("cancel", this, "onCancelClick"));
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     /**
      * When page is first displayed on the GET request.
      *

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/HomePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/HomePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/HomePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/HomePage.java Wed Mar 10 12:06:32 2010
@@ -20,11 +20,11 @@ package org.apache.click.examples.page;
 
 /**
  * Provides the applications home page.
- *
- * @author Malcolm Edgar
  */
 public class HomePage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     public HomePage() {
         getModel().put("title", "Click Examples");
     }

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/SourceViewer.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/SourceViewer.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/SourceViewer.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/SourceViewer.java Wed Mar 10 12:06:32 2010
@@ -33,11 +33,11 @@ import org.apache.commons.lang.StringUti
 
 /**
  * Provides a Java source code, HTML and XML examples rendering page.
- *
- * @author Malcolm Edgar
  */
 public class SourceViewer extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private static final String[] JAVA_KEYWORDS = { "package", "import",
             "class", "public", "protected", "private", "extends", "implements",
             "return", "if", "while", "for", "do", "else", "try", "new", "void",

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxAccordion.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxAccordion.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxAccordion.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxAccordion.java Wed Mar 10 12:06:32 2010
@@ -21,6 +21,7 @@ package org.apache.click.examples.page.a
 import java.util.HashMap;
 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;
@@ -28,13 +29,13 @@ import org.apache.click.examples.page.Bo
 /**
  * Provides an Ajax demo of <a target="_blank" class="external" href="http://flowplayer.org/tools/demos/tabs/accordion.html">jQuery Tools</a>
  * Accordion.
- *
- * @author Malcolm Edgar
  */
 public class AjaxAccordion extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Override
-    public List getHeadElements() {
+    public List<Element> getHeadElements() {
 
         // Lazily load head elements
         if (headElements == null) {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxCustomer.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxCustomer.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxCustomer.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxCustomer.java Wed Mar 10 12:06:32 2010
@@ -38,12 +38,12 @@ import org.springframework.stereotype.Co
  *    &lt;header name="Content-Type" value="text/xml"/&gt;
  * &lt;/page&gt;
  * </pre>
- *
- * @author Malcolm Edgar
  */
 @Component
 public class AjaxCustomer extends Page {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Customer customer;
 
     @Resource(name="customerService")

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxLiveScroller.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxLiveScroller.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxLiveScroller.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxLiveScroller.java Wed Mar 10 12:06:32 2010
@@ -1,96 +1,102 @@
-/*
- * 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.ajax;
-
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Resource;
-import org.apache.click.element.JsImport;
-import org.apache.click.element.JsScript;
-import org.apache.click.examples.page.BorderPage;
-import org.apache.click.examples.service.CustomerService;
-import org.apache.click.util.ClickUtils;
-import org.apache.commons.lang.math.NumberUtils;
-import org.springframework.stereotype.Component;
-
-/**
- * Demonstrates how to to dynamically load more customer while scrolling down
- * the Page.
- *
- * @author Bob Schellink
- */
-@Component
-public class AjaxLiveScroller extends BorderPage {
-
-    @Resource(name="customerService")
-    private CustomerService customerService;
-
-    // Specifies the number of customers to retrieve at a time
-    private int pageSize = 10;
-
-    @Override
-    public void onGet() {
-        // Check if the offset parameter was received.
-        int offset = NumberUtils.toInt(getContext().getRequest().getParameter("offset"));
-
-        if (offset < 0) {
-            // If no offset was given, we assume this is not an Ajax request
-            // and set the offset to 0
-            offset = 0;
-
-            // We also set a message to display
-            addModel("msg", "Top customers");
-        }
-
-        // Return customers between the given offset and pageSize
-        addModel("customers", customerService.getTopCustomersForPage(offset, pageSize));
-    }
-
-    @Override
-    public List getHeadElements() {
-        // Lazily load head elements and ensure they are only loaded once
-        if (headElements == null) {
-            headElements = super.getHeadElements();
-
-            // Add the jQuery library
-            headElements.add(new JsImport("/assets/js/jquery-1.3.2.js"));
-
-            // Create a default model and add the pageSize variable to pass to
-            // the JavaScript template: ajax-live-scroller.js
-            Map model = ClickUtils.createTemplateModel(this, getContext());
-            model.put("pageSize", pageSize);
-
-            // Note the actual JavaScript necessary to setup the dynamic scrolling
-            // is specified in the Page JavaScript template: ajax-live-scroller.js.
-            headElements.add(new JsScript("/ajax/ajax-live-scroller.js", model));
-        }
-        return headElements;
-    }
-
-    @Override
-    public String getTemplate() {
-        // For Ajax requests we want to render the Page template only as there is
-        // no need to include the Border template in the response
-        if (getContext().isAjaxRequest()) {
-            return getPath();
-        } else {
-            return super.getTemplate();
-        }
-    }
-}
+/*
+ * 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.ajax;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+
+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.examples.service.CustomerService;
+import org.apache.click.util.ClickUtils;
+import org.apache.commons.lang.math.NumberUtils;
+import org.springframework.stereotype.Component;
+
+/**
+ * Demonstrates how to to dynamically load more customer while scrolling down
+ * the Page.
+ */
+@Component
+public class AjaxLiveScroller extends BorderPage {
+
+    private static final long serialVersionUID = 1L;
+
+    @Resource(name="customerService")
+    private CustomerService customerService;
+
+    // Specifies the number of customers to retrieve at a time
+    private int pageSize = 10;
+
+    // Event Handlers --------------------------------------------------------
+
+    @Override
+    public void onGet() {
+        // Check if the offset parameter was received.
+        int offset = NumberUtils.toInt(getContext().getRequest().getParameter("offset"));
+
+        if (offset < 0) {
+            // If no offset was given, we assume this is not an Ajax request
+            // and set the offset to 0
+            offset = 0;
+
+            // We also set a message to display
+            addModel("msg", "Top customers");
+        }
+
+        // Return customers between the given offset and pageSize
+        addModel("customers", customerService.getTopCustomersForPage(offset, pageSize));
+    }
+
+    @Override
+    public List<Element> getHeadElements() {
+        // Lazily load head elements and ensure they are only loaded once
+        if (headElements == null) {
+            headElements = super.getHeadElements();
+
+            // Add the jQuery library
+            headElements.add(new JsImport("/assets/js/jquery-1.3.2.js"));
+
+            // Create a default model and add the pageSize variable to pass to
+            // the JavaScript template: ajax-live-scroller.js
+            Map model = ClickUtils.createTemplateModel(this, getContext());
+            model.put("pageSize", pageSize);
+
+            // Note the actual JavaScript necessary to setup the dynamic scrolling
+            // is specified in the Page JavaScript template: ajax-live-scroller.js.
+            headElements.add(new JsScript("/ajax/ajax-live-scroller.js", model));
+        }
+        return headElements;
+    }
+
+    // Public Methods ---------------------------------------------------------
+
+    @Override
+    public String getTemplate() {
+        // For Ajax requests we want to render the Page template only as there is
+        // no need to include the Border template in the response
+        if (getContext().isAjaxRequest()) {
+            return getPath();
+        } else {
+            return super.getTemplate();
+        }
+    }
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxSelect.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxSelect.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxSelect.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AjaxSelect.java Wed Mar 10 12:06:32 2010
@@ -26,6 +26,7 @@ import javax.annotation.Resource;
 import org.apache.click.Context;
 import org.apache.click.control.Option;
 import org.apache.click.control.Select;
+import org.apache.click.element.Element;
 import org.apache.click.element.JsImport;
 import org.apache.click.element.JsScript;
 import org.apache.click.examples.domain.Customer;
@@ -37,17 +38,19 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides an Ajax select example Page.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class AjaxSelect extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Select customerSelect = new Select("customerSelect");
 
     @Resource(name="customerService")
     private CustomerService customerService;
 
+    // Event Handlers ---------------------------------------------------------
+
     @Override
     public void onInit() {
         super.onInit();
@@ -61,7 +64,7 @@ public class AjaxSelect extends BorderPa
     }
 
     @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/ajax/AutoCompletePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AutoCompletePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AutoCompletePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/ajax/AutoCompletePage.java Wed Mar 10 12:06:32 2010
@@ -32,12 +32,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides AJAX AutoCompleteTextField example page.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class AutoCompletePage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
 
     @Resource(name="postCodeService")
@@ -51,6 +51,7 @@ public class AutoCompletePage extends Bo
         form.add(fieldSet);
 
         AutoCompleteTextField locationField = new AutoCompleteTextField("location") {
+            private static final long serialVersionUID = 1L;
 
             public List getAutoCompleteList(String criteria) {
                 return postCodeService.getPostCodeLocations(criteria);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/AccommodationDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/AccommodationDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/AccommodationDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/AccommodationDemo.java Wed Mar 10 12:06:32 2010
@@ -1,112 +1,116 @@
-/*
- * 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.cayenne;
-
-import java.util.List;
-import javax.annotation.Resource;
-import org.apache.cayenne.DataObject;
-
-import org.apache.cayenne.query.SelectQuery;
-import org.apache.click.Context;
-import org.apache.click.control.Column;
-import org.apache.click.control.Decorator;
-import org.apache.click.control.TextField;
-import org.apache.click.examples.domain.Student;
-import org.apache.click.examples.domain.StudentHouse;
-import org.apache.click.examples.service.StudentService;
-import org.apache.click.extras.cayenne.PropertySelect;
-import org.springframework.stereotype.Component;
-
-/**
- * This example demonstrates how to represent a one-to-many relationship
- * between StudentHouse and Students using Apache Click.
- *
- * A Student House can have many Students, and a Student can only live
- * in one Student House.
- *
- * The relationship is managed by a Select control.
- *
- * @author Bob Schellink
- */
-@Component
-public class AccommodationDemo extends FormTablePage {
-
-    @Resource(name="studentService")
-    private StudentService studentService;
-
-    private PropertySelect select;
-
-    /**
-     * @see FormTablePage#onInit()
-     */
-    @Override
-    public void onInit() {
-        form.add(new TextField("name")).setRequired(true);
-
-        select = new PropertySelect("studentHouse");
-
-        // Populate the Select control with Student Houses where "id" is the
-        // option value and "name" is the option label
-        select.setSelectQuery(new SelectQuery(StudentHouse.class));
-        select.setOptionLabel("name");
-        select.setOptional(true);
-        form.add(select);
-
-        // Table
-        table.addColumn(new Column("id"));
-        table.addColumn(new Column("name"));
-        table.addColumn(new Column("studentHouse")).setDecorator(new Decorator() {
-
-            public String render(Object object, Context context) {
-                Student student = (Student) object;
-                if (student.getStudentHouse() != null) {
-                    return student.getStudentHouse().getName();
-                } else {
-                    return "";
-                }
-            }
-        });
-
-        super.onInit();
-    }
-
-    /**
-     * @see FormTablePage#getDataObject(Object)
-     */
-    @Override
-    public DataObject getDataObject(Object id) {
-        return studentService.getStudent(id);
-    }
-
-    /**
-     * @see FormTablePage#getDataObjectClass()
-     */
-    @Override
-    public Class getDataObjectClass() {
-        return Student.class;
-    }
-
-    /**
-     * @see FormTablePage#getRowList()
-     */
-    @Override
-    public List getRowList() {
-        return studentService.getStudentsByHouse();
-    }
-}
+/*
+ * 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.cayenne;
+
+import java.util.List;
+import javax.annotation.Resource;
+import org.apache.cayenne.DataObject;
+
+import org.apache.cayenne.query.SelectQuery;
+import org.apache.click.Context;
+import org.apache.click.control.Column;
+import org.apache.click.control.Decorator;
+import org.apache.click.control.TextField;
+import org.apache.click.examples.domain.Student;
+import org.apache.click.examples.domain.StudentHouse;
+import org.apache.click.examples.service.StudentService;
+import org.apache.click.extras.cayenne.PropertySelect;
+import org.springframework.stereotype.Component;
+
+/**
+ * This example demonstrates how to represent a one-to-many relationship
+ * between StudentHouse and Students using Apache Click.
+ *
+ * A Student House can have many Students, and a Student can only live
+ * in one Student House.
+ *
+ * The relationship is managed by a Select control.
+ */
+@Component
+public class AccommodationDemo extends FormTablePage {
+
+    private static final long serialVersionUID = 1L;
+
+    @Resource(name="studentService")
+    private StudentService studentService;
+
+    private PropertySelect select;
+
+    // Event Handlers ---------------------------------------------------------
+
+    /**
+     * @see FormTablePage#onInit()
+     */
+    @Override
+    public void onInit() {
+        form.add(new TextField("name")).setRequired(true);
+
+        select = new PropertySelect("studentHouse");
+
+        // Populate the Select control with Student Houses where "id" is the
+        // option value and "name" is the option label
+        select.setSelectQuery(new SelectQuery(StudentHouse.class));
+        select.setOptionLabel("name");
+        select.setOptional(true);
+        form.add(select);
+
+        // Table
+        table.addColumn(new Column("id"));
+        table.addColumn(new Column("name"));
+        table.addColumn(new Column("studentHouse")).setDecorator(new Decorator() {
+
+            public String render(Object object, Context context) {
+                Student student = (Student) object;
+                if (student.getStudentHouse() != null) {
+                    return student.getStudentHouse().getName();
+                } else {
+                    return "";
+                }
+            }
+        });
+
+        super.onInit();
+    }
+
+    // Public Methods --------------------------------------------------------
+
+    /**
+     * @see FormTablePage#getDataObject(Object)
+     */
+    @Override
+    public DataObject getDataObject(Object id) {
+        return studentService.getStudent(id);
+    }
+
+    /**
+     * @see FormTablePage#getDataObjectClass()
+     */
+    @Override
+    public Class getDataObjectClass() {
+        return Student.class;
+    }
+
+    /**
+     * @see FormTablePage#getRowList()
+     */
+    @Override
+    public List<Student> getRowList() {
+        return studentService.getStudentsByHouse();
+    }
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/CayenneFormPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/CayenneFormPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/CayenneFormPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/CayenneFormPage.java Wed Mar 10 12:06:32 2010
@@ -38,16 +38,16 @@ import org.springframework.stereotype.Co
  * Provides a CayenneForm and QuerySelect control demonstration.
  *
  * @see FormTablePage
- *
- * @author Malcolm Edgar
  */
 @Component
 public class CayenneFormPage extends FormTablePage {
 
+    private static final long serialVersionUID = 1L;
+
     @Resource(name="clientService")
     private ClientService clientService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     /**
      * Create a CayenneFormPage object.
@@ -96,7 +96,7 @@ public class CayenneFormPage extends For
         table.addColumn(column);
     }
 
-    // -------------------------------------------------------- Public Methods
+    // Public Methods --------------------------------------------------------
 
     /**
      * @see FormTablePage#getDataObject(Object)

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/EnrollmentDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/EnrollmentDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/EnrollmentDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/EnrollmentDemo.java Wed Mar 10 12:06:32 2010
@@ -1,155 +1,159 @@
-/*
- * 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.cayenne;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-
-import org.apache.cayenne.DataObject;
-import org.apache.click.control.Column;
-import org.apache.click.control.TextField;
-import org.apache.click.examples.domain.Course;
-import org.apache.click.examples.domain.Student;
-import org.apache.click.examples.service.StudentService;
-import org.apache.click.extras.control.PickList;
-import org.springframework.stereotype.Component;
-
-/**
- * This example demonstrates how to represent a many-to-many relationship
- * between Students and Courses using Apache Click.
- *
- * A Student can take many Courses, and a Course can be taken by many Students.
- *
- * The relationship is managed by a PickList control.
- *
- * @author Bob Schellink
- */
-@Component
-public class EnrollmentDemo extends FormTablePage {
-
-    @Resource(name="studentService")
-    private StudentService studentService;
-
-    private PickList pickList;
-
-    /**
-     * @see FormTablePage#onInit()
-     */
-    public void onInit() {
-        form.add(new TextField("name")).setRequired(true);
-
-        pickList = new PickList("courseList", "Courses");
-        pickList.addAll(studentService.getCourses(), "id", "name");
-        form.add(pickList);
-
-        // Table
-        table.addColumn(new Column("id"));
-        table.addColumn(new Column("name"));
-
-        super.onInit();
-    }
-
-    /**
-     * @see FormTablePage#onSaveClick()
-     */
-    public boolean onSaveClick() {
-        if (form.isValid()) {
-            Student student = (Student) form.getDataObject();
-
-            List courseIds = pickList.getSelectedValues();
-            studentService.setStudentCourses(student, courseIds);
-
-            saveDataObject(student);
-
-            clear();
-        }
-        return true;
-    }
-
-    /**
-     * @see FormTablePage#onEditClick()
-     */
-    public boolean onEditClick() {
-        Student student = getSelectedStudent();
-
-        // If no student is selected, exist early
-        if (student == null) {
-            return true;
-        }
-
-        // Add each student course to the PickList
-        List courses = student.getCourses();
-        for (int i = 0; i < courses.size(); i++) {
-            Course course = (Course) courses.get(i);
-            pickList.addSelectedValue(course.getId().toString());
-        }
-        form.setDataObject(student);
-
-        return true;
-    }
-
-    /**
-     * @see FormTablePage#clear()
-     */
-    @Override
-    public void clear() {
-        pickList.setSelectedValues(null);
-        super.clear();
-    }
-
-    /**
-     * @see FormTablePage#getDataObject(Object)
-     */
-    @Override
-    public DataObject getDataObject(Object id) {
-        return studentService.getStudent(id);
-    }
-
-    /**
-     * @see FormTablePage#getDataObjectClass()
-     */
-    @Override
-    public Class getDataObjectClass() {
-        return Student.class;
-    }
-
-    /**
-     * @see FormTablePage#getRowList()
-     */
-    @Override
-    public List getRowList() {
-        return studentService.getStudents();
-    }
-
-    /**
-     * Return the selected student or null if no student is selected.
-     *
-     * @return the selected student or null if no student is selected
-     */
-    private Student getSelectedStudent() {
-        Student student = null;
-
-        Integer id = editLink.getValueInteger();
-        if (id != null) {
-            student = (Student) getDataObject(id);
-        }
-        return student;
-    }
-}
+/*
+ * 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.cayenne;
+
+import java.util.List;
+
+import javax.annotation.Resource;
+
+import org.apache.cayenne.DataObject;
+import org.apache.click.control.Column;
+import org.apache.click.control.TextField;
+import org.apache.click.examples.domain.Course;
+import org.apache.click.examples.domain.Student;
+import org.apache.click.examples.service.StudentService;
+import org.apache.click.extras.control.PickList;
+import org.springframework.stereotype.Component;
+
+/**
+ * This example demonstrates how to represent a many-to-many relationship
+ * between Students and Courses using Apache Click.
+ *
+ * A Student can take many Courses, and a Course can be taken by many Students.
+ *
+ * The relationship is managed by a PickList control.
+ */
+@Component
+public class EnrollmentDemo extends FormTablePage {
+
+    private static final long serialVersionUID = 1L;
+
+    @Resource(name="studentService")
+    private StudentService studentService;
+
+    private PickList pickList;
+
+    // Event Handlers ---------------------------------------------------------
+
+    /**
+     * @see FormTablePage#onInit()
+     */
+    public void onInit() {
+        form.add(new TextField("name")).setRequired(true);
+
+        pickList = new PickList("courseList", "Courses");
+        pickList.addAll(studentService.getCourses(), "id", "name");
+        form.add(pickList);
+
+        // Table
+        table.addColumn(new Column("id"));
+        table.addColumn(new Column("name"));
+
+        super.onInit();
+    }
+
+    /**
+     * @see FormTablePage#onSaveClick()
+     */
+    public boolean onSaveClick() {
+        if (form.isValid()) {
+            Student student = (Student) form.getDataObject();
+
+            List courseIds = pickList.getSelectedValues();
+            studentService.setStudentCourses(student, courseIds);
+
+            saveDataObject(student);
+
+            clear();
+        }
+        return true;
+    }
+
+    /**
+     * @see FormTablePage#onEditClick()
+     */
+    public boolean onEditClick() {
+        Student student = getSelectedStudent();
+
+        // If no student is selected, exist early
+        if (student == null) {
+            return true;
+        }
+
+        // Add each student course to the PickList
+        List courses = student.getCourses();
+        for (int i = 0; i < courses.size(); i++) {
+            Course course = (Course) courses.get(i);
+            pickList.addSelectedValue(course.getId().toString());
+        }
+        form.setDataObject(student);
+
+        return true;
+    }
+
+    // Public Methods ---------------------------------------------------------
+
+    /**
+     * @see FormTablePage#clear()
+     */
+    @Override
+    public void clear() {
+        pickList.setSelectedValues(null);
+        super.clear();
+    }
+
+    /**
+     * @see FormTablePage#getDataObject(Object)
+     */
+    @Override
+    public DataObject getDataObject(Object id) {
+        return studentService.getStudent(id);
+    }
+
+    /**
+     * @see FormTablePage#getDataObjectClass()
+     */
+    @Override
+    public Class getDataObjectClass() {
+        return Student.class;
+    }
+
+    /**
+     * @see FormTablePage#getRowList()
+     */
+    @Override
+    public List getRowList() {
+        return studentService.getStudents();
+    }
+
+    /**
+     * Return the selected student or null if no student is selected.
+     *
+     * @return the selected student or null if no student is selected
+     */
+    private Student getSelectedStudent() {
+        Student student = null;
+
+        Integer id = editLink.getValueInteger();
+        if (id != null) {
+            student = (Student) getDataObject(id);
+        }
+        return student;
+    }
+}

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/FormTablePage.java Wed Mar 10 12:06:32 2010
@@ -42,17 +42,17 @@ import org.apache.click.util.Bindable;
  * <li>{@link #getDataObject(Object)} &nbsp; - to look up the DataObject for the given id</li>
  * <li>{@link #getRowList()} &nbsp; - to provide the table the list of DataObject to display</li>
  * </ul>
- *
- * @author Malcolm Edgar
  */
 public abstract class FormTablePage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected CayenneForm form;
     @Bindable protected Table table = new Table();
     @Bindable protected ActionLink editLink = new ActionLink("edit", this, "onEditClick");
     @Bindable protected ActionLink removeLink = new ActionLink("remove", this, "onRemoveClick");
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     /**
      * Create a FormTablePage instance and initialize the form and table
@@ -73,7 +73,7 @@ public abstract class FormTablePage exte
         removeLink.setImageSrc("/assets/images/delete.gif");
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * Perform a form submission check to ensure the form was not double posted.

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/TabbedCayenneFormPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/TabbedCayenneFormPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/TabbedCayenneFormPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/cayenne/TabbedCayenneFormPage.java Wed Mar 10 12:06:32 2010
@@ -40,15 +40,17 @@ import org.springframework.stereotype.Co
  * Provides a TabbedCayenneForm and QuerySelect control demonstration.
  *
  * @see FormTablePage
- *
- * @author Malcolm Edgar
  */
 @Component
 public class TabbedCayenneFormPage extends FormTablePage {
 
+    private static final long serialVersionUID = 1L;
+
     @Resource(name="clientService")
     private ClientService clientService;
 
+    // Constructor -----------------------------------------------------------
+
     /**
      * Create a TabbedCayenneFormPage object.
      */
@@ -100,6 +102,8 @@ public class TabbedCayenneFormPage exten
         table.addColumn(column);
     }
 
+    // Public Methods ---------------------------------------------------------
+
     /**
      * @see FormTablePage#createForm()
      */

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/ActionDemo.java Wed Mar 10 12:06:32 2010
@@ -33,11 +33,11 @@ import org.apache.click.util.Bindable;
  * In this example public fields are automatically added to the Page model using
  * their field name. In the case of controls their name will be automatically
  * set to their field name.
- *
- * @author Malcolm Edgar
  */
 public class ActionDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected ActionLink link = new ActionLink();
     @Bindable protected ActionButton button = new ActionButton();
     @Bindable protected String clicked;
@@ -45,6 +45,8 @@ public class ActionDemo extends BorderPa
     public ActionDemo() {
 
         link.setActionListener(new ActionListener() {
+            private static final long serialVersionUID = 1L;
+
             public boolean onAction(Control source) {
                 clicked = source.getClass().getName() + ".onAction invoked at " + (new Date());
                 return true;

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/CheckListDemo.java Wed Mar 10 12:06:32 2010
@@ -28,16 +28,16 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides CheckList control example.
- *
- * @author Christian Essel
  */
 public class CheckListDemo extends BorderPage{
 
-    private static final List STANDARD_OPTIONS;
-    private static final List SORTABLE_OPTIONS = new ArrayList();
+    private static final long serialVersionUID = 1L;
+
+    private static final List<Option> STANDARD_OPTIONS;
+    private static final List<Option> SORTABLE_OPTIONS = new ArrayList<Option>();
 
     static {
-        List list = new ArrayList();
+        List<Option> list = new ArrayList<Option>();
         for (int i = 1; i <= 4; i++) {
             list.add(new Option(Integer.toString(i),
                      "Tutam gallia deviso est in partes " + i));
@@ -55,6 +55,8 @@ public class CheckListDemo extends Borde
     private CheckList standardCheckList;
     private CheckList sortableCheckList;
 
+    // Constructor ------------------------------------------------------------
+
     public CheckListDemo() {
         form.setFieldStyle("width:20em;");
 
@@ -73,6 +75,8 @@ public class CheckListDemo extends Borde
         form.add(new PageSubmit("cancel", HomePage.class));
     }
 
+    // Event Handlers --------------------------------------------------------
+
     public boolean onOkClick() {
         if (form.isValid()) {
             addModel("showSelected", Boolean.TRUE);

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

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/FieldSetDemo.java Wed Mar 10 12:06:32 2010
@@ -18,9 +18,6 @@
  */
 package org.apache.click.examples.page.control;
 
-import java.util.Iterator;
-import java.util.List;
-
 import org.apache.click.control.Checkbox;
 import org.apache.click.control.Field;
 import org.apache.click.control.FieldSet;
@@ -42,11 +39,11 @@ import org.apache.click.util.ContainerUt
 
 /**
  * Provides a form FieldSet example.
- *
- * @author Malcolm Edgar
  */
 public class FieldSetDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
 
     // Payment options
@@ -55,6 +52,8 @@ public class FieldSetDemo extends Border
     private CreditCardField cardNumber;
     private IntegerField cardExpiry;
 
+    // Constructor -----------------------------------------------------------
+
     public FieldSetDemo() {
         form.setLabelAlign(Form.ALIGN_RIGHT);
         form.setLabelStyle("width:11em;");
@@ -108,17 +107,19 @@ public class FieldSetDemo extends Border
         form.add(new PageSubmit("cancel", HomePage.class));
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     public boolean onOkClick() {
         if (isFormValid()) {
-            List fieldList = ContainerUtils.getInputFields(form);
-            for (Iterator i = fieldList.iterator(); i.hasNext(); ) {
-                Field field = (Field) i.next();
+            for (Field field : ContainerUtils.getInputFields(form)) {
                 System.out.println(field.getName() + "=" + field.getValue());
             }
         }
         return true;
     }
 
+    // Public Methods ---------------------------------------------------------
+
     /**
      * Perform additional form cross field validation returning true if valid.
      *

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/FileUpload.java Wed Mar 10 12:06:32 2010
@@ -30,11 +30,11 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides File Upload example using the FileField control.
- *
- * @author Malcolm Edgar
  */
 public class FileUpload extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
 
     private FileField fileField1;
@@ -43,6 +43,8 @@ public class FileUpload extends BorderPa
     private FileField fileField2;
     private TextField descField2;
 
+    // Constructor ------------------------------------------------------------
+
     public FileUpload() {
         form.setLabelsPosition("top");
 
@@ -68,6 +70,8 @@ public class FileUpload extends BorderPa
         form.add(new PageSubmit("cancel", HomePage.class));
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     public boolean onOkClick() {
 
         if (form.isValid()) {

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/ImageDemo.java Wed Mar 10 12:06:32 2010
@@ -26,16 +26,18 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides an ImageSubmit control example.
- *
- * @author Malcolm Edgar
  */
 public class ImageDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private ImageSubmit colorSubmit;
 
     @Bindable protected Form buttonsForm = new Form();
     @Bindable protected Form form = new Form();
 
+    // Constructor ------------------------------------------------------------
+
     public ImageDemo() {
         // Buttons Form
         ImageSubmit editSubmit = new ImageSubmit("edit", "/assets/images/edit.gif");
@@ -56,6 +58,8 @@ public class ImageDemo extends BorderPag
         form.add(colorSubmit);
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     public boolean onEditClick() {
         addModel("buttonMsg", "Edit");
         return true;

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/LinkDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/LinkDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/LinkDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/LinkDemo.java Wed Mar 10 12:06:32 2010
@@ -30,11 +30,11 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides an ActionLink, ExternalLink and PageLink control examples Page.
- *
- * @author Malcolm Edgar
  */
 public class LinkDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected ActionLink actionLink = new ActionLink("ActionLink", this, "onLinkClick");
     @Bindable protected ActionLink disabledActionLink = new ActionLink("DisabledActionLink", this, "onLinkClick");
     @Bindable protected ActionLink iconActionLink = new ActionLink("IconActionLink", this, "onLinkClick");
@@ -49,6 +49,8 @@ public class LinkDemo extends BorderPage
 
     @Bindable protected String clicked;
 
+    // Constructor ------------------------------------------------------------
+
     public LinkDemo() {
         iconActionLink.setRenderLabelAndImage(true);
         iconActionLink.addStyleClass("image-link");
@@ -65,6 +67,8 @@ public class LinkDemo extends BorderPage
         disabledPageButton.setDisabled(true);
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     public boolean onLinkClick() {
         clicked = getClass().getName() + ".onLinkClick invoked at " + (new Date());
         return true;

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

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/PickListDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/PickListDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/PickListDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/PickListDemo.java Wed Mar 10 12:06:32 2010
@@ -29,16 +29,18 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides an Select example Page.
- *
- * @author Naoki Takezoe
  */
 public class PickListDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
     @Bindable protected List selectedValues;
 
     private PickList pickList = new PickList("languages");
 
+    // Constructor ------------------------------------------------------------
+
     public PickListDemo() {
         pickList.setHeaderLabel("Languages", "Selected");
 
@@ -58,6 +60,8 @@ public class PickListDemo extends Border
         form.add(new Submit("canel", this, "onCancelClick"));
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     public boolean onOkClick() {
         selectedValues = pickList.getSelectedValues();
         return true;

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

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/SelectDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/SelectDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/SelectDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/SelectDemo.java Wed Mar 10 12:06:32 2010
@@ -34,11 +34,11 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides an Select example Page.
- *
- * @author Malcolm Edgar
  */
 public class SelectDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
 
     private Select genderSelect;
@@ -46,6 +46,9 @@ public class SelectDemo extends BorderPa
     private Select locationSelect;
     private Select countrySelect;
 
+    // Constructor ------------------------------------------------------------
+
+    @SuppressWarnings("unchecked")
     public SelectDemo() {
         form.setErrorsPosition(Form.POSITION_TOP);
 
@@ -96,6 +99,8 @@ public class SelectDemo extends BorderPa
         form.add(new PageSubmit("canel", HomePage.class));
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     /**
      * @see org.apache.click.Page#onPost()
      */

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/control/SubmitLinkDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/control/SubmitLinkDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/control/SubmitLinkDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/control/SubmitLinkDemo.java Wed Mar 10 12:06:32 2010
@@ -32,11 +32,11 @@ import org.apache.click.util.Bindable;
 /**
  * This example demonstrates how to use a SubmitLink control together with the
  * Form control.
- *
- * @author Bob Schellink
  */
 public class SubmitLinkDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected String demo1Msg;
 
     @Bindable protected String demo2Msg;
@@ -45,6 +45,8 @@ public class SubmitLinkDemo extends Bord
 
     @Bindable protected String demo4Msg;
 
+    // Constructor ------------------------------------------------------------
+
     public SubmitLinkDemo() {
         demo1();
 
@@ -55,6 +57,8 @@ public class SubmitLinkDemo extends Bord
         demo4();
     }
 
+    // Public Methods --------------------------------------------------------
+
     public void demo1() {
         // Create a submit link.
         final SubmitLink submitLink = new SubmitLink("submit");

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/ContactDetailsPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/ContactDetailsPage.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/ContactDetailsPage.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/ContactDetailsPage.java Wed Mar 10 12:06:32 2010
@@ -35,11 +35,11 @@ import org.apache.click.extras.control.P
 /**
  * This page demonstrates how to programmatically layout a form using
  * custom Controls and CSS.
- *
- * @author Bob Schellink
  */
 public class ContactDetailsPage extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private CssForm form;
 
     @Override

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/ExtraControlsForm.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/ExtraControlsForm.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/ExtraControlsForm.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/ExtraControlsForm.java Wed Mar 10 12:06:32 2010
@@ -19,7 +19,6 @@
 package org.apache.click.examples.page.form;
 
 import java.io.Serializable;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.annotation.Resource;
@@ -29,6 +28,7 @@ import org.apache.click.control.Field;
 import org.apache.click.control.FieldSet;
 import org.apache.click.control.Form;
 import org.apache.click.control.Submit;
+import org.apache.click.examples.domain.Customer;
 import org.apache.click.examples.page.BorderPage;
 import org.apache.click.examples.page.HomePage;
 import org.apache.click.examples.service.CustomerService;
@@ -53,12 +53,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides a form containing all the Click Extras Controls.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class ExtraControlsForm extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     /** Form options holder. */
     public static class Options implements Serializable {
         static final long serialVersionUID = 1L;
@@ -76,7 +76,7 @@ public class ExtraControlsForm extends B
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public ExtraControlsForm() {
         form.setErrorsPosition(Form.POSITION_TOP);
@@ -110,7 +110,7 @@ public class ExtraControlsForm extends B
         optionsForm.setListener(this, "onOptionsSubmit");
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -119,7 +119,7 @@ public class ExtraControlsForm extends B
     public void onInit() {
         super.onInit();
 
-        List customers = customerService.getCustomers();
+        List<Customer> customers = customerService.getCustomers();
         checkList.addAll(customers, "id", "name");
         applyOptions();
     }
@@ -133,15 +133,13 @@ public class ExtraControlsForm extends B
         return true;
     }
 
-    // -------------------------------------------------------- Private Methods
+    // Private Methods --------------------------------------------------------
 
     private void applyOptions() {
         Options options = (Options) ExampleUtils.getSessionObject(Options.class);
 
         form.setJavaScriptValidation(options.javaScriptValidate);
-        List formFiels = ContainerUtils.getInputFields(form);
-        for (Iterator i = formFiels.iterator(); i.hasNext();) {
-            Field field = (Field) i.next();
+        for (Field field :  ContainerUtils.getInputFields(form)) {
             field.setRequired(options.allFieldsRequired);
         }
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/FormLayout.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormLayout.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/FormLayout.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/FormLayout.java Wed Mar 10 12:06:32 2010
@@ -34,11 +34,11 @@ import org.apache.click.util.Bindable;
 
 /**
  * Provides Form layout examples using the Form and FieldSet controls.
- *
- * @author Malcolm Edgar
  */
 public class FormLayout extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form1 = new Form();
     @Bindable protected Form form2 = new Form();
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/FormProperties.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/FormProperties.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/FormProperties.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/FormProperties.java Wed Mar 10 12:06:32 2010
@@ -38,11 +38,11 @@ import org.apache.click.extras.control.P
 
 /**
  * Provides a example Page to demonstrate Form properties and layout options.
- *
- * @author Malcolm Edgar
  */
 public class FormProperties extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     /** Form options holder. */
     public static class Options implements Serializable {
         static final long serialVersionUID = 1L;
@@ -95,7 +95,7 @@ public class FormProperties extends Bord
     private Checkbox validateCheckbox;
     private Checkbox javaScriptValidateCheckbox;
 
-    // ------------------------------------------------------------ Constructor
+    //  Constructor -----------------------------------------------------------
 
     public FormProperties() {
 
@@ -230,7 +230,7 @@ public class FormProperties extends Bord
         getHeadElements().add(jsScript);
     }
 
-    // ---------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -300,7 +300,7 @@ public class FormProperties extends Bord
         return true;
     }
 
-    // -------------------------------------------------------- Private Methods
+    // Private Methods --------------------------------------------------------
 
     private void applyOptions(Options options) {
         form.setButtonAlign(options.buttonAlign);

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/MultipleFormsDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/MultipleFormsDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/MultipleFormsDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/MultipleFormsDemo.java Wed Mar 10 12:06:32 2010
@@ -25,15 +25,15 @@ import org.apache.click.examples.page.Bo
 
 /**
  * Provides an example of multiple Forms on one page using submit checks.
- *
- * @author Bob Schellink
  */
 public class MultipleFormsDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private Form form1 = new Form("form1");
     private Form form2 = new Form("form2");
 
-    // --------------------------------------------------------- Event Handlers
+    //  Event Handlers --------------------------------------------------------
 
 
     /**
@@ -106,7 +106,7 @@ public class MultipleFormsDemo extends B
         return true;
     }
 
-    // --------------------------------------------------------- Public Methods
+    // Public Methods ---------------------------------------------------------
 
     public void redirectAfterPost() {
         // redirect back to this page after the post

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/SearchForm.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/SearchForm.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/SearchForm.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/SearchForm.java Wed Mar 10 12:06:32 2010
@@ -30,19 +30,18 @@ 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.commons.lang.StringUtils;
 import org.apache.commons.lang.math.NumberUtils;
 import org.springframework.stereotype.Component;
 
 /**
  * Provides a search form example demonstrating how to layout a form manually
  * in the page template.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class SearchForm extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     @Bindable protected Form form = new Form();
 
     private TextField textField;
@@ -51,6 +50,8 @@ public class SearchForm extends BorderPa
     @Resource(name="customerService")
     private CustomerService customerService;
 
+    // Constructor ------------------------------------------------------------
+
     public SearchForm() {
         textField = new TextField("search");
         form.add(textField);
@@ -64,6 +65,8 @@ public class SearchForm extends BorderPa
         form.add(new Submit("go", " Go "));
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     /**
      * @see org.apache.click.Page#onPost()
      */

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/StandardControlsForm.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/StandardControlsForm.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/StandardControlsForm.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/StandardControlsForm.java Wed Mar 10 12:06:32 2010
@@ -19,7 +19,6 @@
 package org.apache.click.examples.page.form;
 
 import java.io.Serializable;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.annotation.Resource;
@@ -52,12 +51,12 @@ import org.springframework.stereotype.Co
 
 /**
  * Provides a form containing all the Standard Click Controls.
- *
- * @author Malcolm Edgar
  */
 @Component
 public class StandardControlsForm extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     /** Form options holder. */
     public static class Options implements Serializable {
         static final long serialVersionUID = 1L;
@@ -75,7 +74,7 @@ public class StandardControlsForm extend
     @Resource(name="customerService")
     private CustomerService customerService;
 
-    // ------------------------------------------------------------ Constructor
+    // Constructor ------------------------------------------------------------
 
     public StandardControlsForm() {
         form.setErrorsPosition(Form.POSITION_TOP);
@@ -119,7 +118,7 @@ public class StandardControlsForm extend
         optionsForm.setListener(this, "onOptionsSubmit");
     }
 
-    // --------------------------------------------------------- Event Handlers
+    // Event Handlers ---------------------------------------------------------
 
     /**
      * @see org.apache.click.Page#onInit()
@@ -143,15 +142,13 @@ public class StandardControlsForm extend
         return true;
     }
 
-    // -------------------------------------------------------- Private Methods
+    // Private Methods --------------------------------------------------------
 
     private void applyOptions() {
         Options options = (Options) ExampleUtils.getSessionObject(Options.class);
 
         form.setJavaScriptValidation(options.javaScriptValidate);
-        List formFiels = ContainerUtils.getInputFields(form);
-        for (Iterator i = formFiels.iterator(); i.hasNext();) {
-            Field field = (Field) i.next();
+        for (Field field : ContainerUtils.getInputFields(form)) {
             field.setRequired(options.allFieldsRequired);
         }
 

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/form/TabbedFormDemo.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/form/TabbedFormDemo.java?rev=921323&r1=921322&r2=921323&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/form/TabbedFormDemo.java (original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/form/TabbedFormDemo.java Wed Mar 10 12:06:32 2010
@@ -18,9 +18,6 @@
  */
 package org.apache.click.examples.page.form;
 
-import java.util.Iterator;
-import java.util.List;
-
 import org.apache.click.control.Checkbox;
 import org.apache.click.control.Field;
 import org.apache.click.control.FieldSet;
@@ -45,11 +42,11 @@ import org.apache.click.util.ContainerUt
 
 /**
  * Provides an TabbedForm control example.
- *
- * @author Malcolm Edgar
  */
 public class TabbedFormDemo extends BorderPage {
 
+    private static final long serialVersionUID = 1L;
+
     private TabbedForm form = new TabbedForm("form");
     private RadioGroup paymentGroup = new RadioGroup("paymentOption", true);
     private TelephoneField contactNumber = new TelephoneField("contactNumber");
@@ -58,6 +55,8 @@ public class TabbedFormDemo extends Bord
     private CreditCardField cardNumber = new CreditCardField("cardNumber");
     private IntegerField expiry = new IntegerField("expiry");
 
+    // Constructor ------------------------------------------------------------
+
     public TabbedFormDemo() {
 
         form.setBackgroundColor("#FFFABF");
@@ -124,6 +123,8 @@ public class TabbedFormDemo extends Bord
         addControl(form);
     }
 
+    // Event Handlers ---------------------------------------------------------
+
     public boolean onOkClick() {
         if (isFormValid()) {
             processDelivery();
@@ -131,6 +132,8 @@ public class TabbedFormDemo extends Bord
         return true;
     }
 
+    // Protected Methods ------------------------------------------------------
+
     /**
      * Perform additional form cross field validation returning true if valid.
      *
@@ -154,10 +157,8 @@ public class TabbedFormDemo extends Bord
         return form.isValid();
     }
 
-    private void processDelivery() {
-        List fieldList = ContainerUtils.getInputFields(form);
-        for (Iterator i = fieldList.iterator(); i.hasNext(); ) {
-            Field field = (Field) i.next();
+    protected void processDelivery() {
+        for (Field field : ContainerUtils.getInputFields(form)) {
             System.out.println(field.getName() + "=" + field.getValue());
         }
     }



Mime
View raw message