Return-Path: Delivered-To: apmail-click-commits-archive@www.apache.org Received: (qmail 1865 invoked from network); 30 Jan 2011 03:40:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jan 2011 03:40:39 -0000 Received: (qmail 56880 invoked by uid 500); 30 Jan 2011 03:40:38 -0000 Delivered-To: apmail-click-commits-archive@click.apache.org Received: (qmail 56868 invoked by uid 500); 30 Jan 2011 03:40:38 -0000 Mailing-List: contact commits-help@click.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: click-dev@click.apache.org Delivered-To: mailing list commits@click.apache.org Received: (qmail 56860 invoked by uid 99); 30 Jan 2011 03:40:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Jan 2011 03:40:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Jan 2011 03:40:36 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 171BF23889EA; Sun, 30 Jan 2011 03:40:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1065172 - in /click/trunk/click/examples/src/org/apache/click/examples/page/wizard: Step1.java Step2.java Step3.java Date: Sun, 30 Jan 2011 03:40:15 -0000 To: commits@click.apache.org From: sabob@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110130034016.171BF23889EA@eris.apache.org> Author: sabob Date: Sun Jan 30 03:40:14 2011 New Revision: 1065172 URL: http://svn.apache.org/viewvc?rev=1065172&view=rev Log: cleanup Modified: click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step2.java click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step3.java Modified: click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java?rev=1065172&r1=1065171&r2=1065172&view=diff ============================================================================== --- click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java (original) +++ click/trunk/click/examples/src/org/apache/click/examples/page/wizard/Step1.java Sun Jan 30 03:40:14 2011 @@ -40,11 +40,16 @@ public class Step1 extends Step { private static final long serialVersionUID = 1L; + // Variables -------------------------------------------------------------- + /** The client domain object created through the wizard. */ private Client client; + /** The client service. */ private ClientService clientService; + // Constructors ----------------------------------------------------------- + /** * Construct Step1 with the specified name, label, description and page. * @@ -56,7 +61,8 @@ public class Step1 extends Step { public Step1(String name, String label, String description, WizardPage page) { super(name, label, description, page); - Select titleSelect = createTitleSelect(); + Select titleSelect = new Select("title", true); + setupTitleSelect(titleSelect); getForm().add(titleSelect); getForm().add(new TextField("firstName", true)); @@ -70,6 +76,8 @@ public class Step1 extends Step { } } + // Public methods --------------------------------------------------------- + /** * The onNext action of Step1 sets the Page to stateful, checks if the form * is valid, moves to the next step in the process and passes the client to @@ -106,12 +114,12 @@ public class Step1 extends Step { return clientService; } - private Select createTitleSelect() { - Select titleSelect = new Select("title", true); + // Private methods -------------------------------------------------------- - titleSelect.setDefaultOption(Option.EMPTY_OPTION); + private void setupTitleSelect(Select select) { + select.setDefaultOption(Option.EMPTY_OPTION); - titleSelect.setDataProvider(new DataProvider() { + select.setDataProvider(new DataProvider() { public List