click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r948238 - /click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java
Date Tue, 25 May 2010 22:57:44 GMT
Author: sabob
Date: Tue May 25 22:57:44 2010
New Revision: 948238

URL: http://svn.apache.org/viewvc?rev=948238&view=rev
Log:
select dataprovider should return options, not objects

Modified:
    click/trunk/click/examples/src/org/apache/click/examples/page/introduction/AdvancedForm.java

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=948238&r1=948237&r2=948238&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
Tue May 25 22:57:44 2010
@@ -18,6 +18,7 @@
  */
 package org.apache.click.examples.page.introduction;
 
+import java.util.ArrayList;
 import java.util.List;
 import javax.annotation.Resource;
 
@@ -90,7 +91,11 @@ public class AdvancedForm extends Border
         investmentSelect.setDataProvider(new DataProvider() {
 
             public List getData() {
-                return customerService.getInvestmentCategories();
+                List<Option> options = new ArrayList<Option>();
+                for (String category : customerService.getInvestmentCategories()) {
+                    options.add(new Option(category));
+                }
+                return options;
             }
         });
     }



Mime
View raw message