Author: nbelaevski
Date: 2010-07-06 13:04:49 -0400 (Tue, 06 Jul 2010)
New Revision: 17748
Added:
root/examples-sandbox/trunk/components/combobox-demo/src/main/java/org/
root/examples-sandbox/trunk/components/combobox-demo/src/main/java/org/richfaces/
root/examples-sandbox/trunk/components/combobox-demo/src/main/java/org/richfaces/demo/
root/examples-sandbox/trunk/components/combobox-demo/src/main/java/org/richfaces/demo/DataBean.java
root/examples-sandbox/trunk/components/combobox-demo/src/main/webapp/index.xhtml
Log:
Latest comboBox changes check-in
Added:
root/examples-sandbox/trunk/components/combobox-demo/src/main/java/org/richfaces/demo/DataBean.java
===================================================================
---
root/examples-sandbox/trunk/components/combobox-demo/src/main/java/org/richfaces/demo/DataBean.java
(rev 0)
+++
root/examples-sandbox/trunk/components/combobox-demo/src/main/java/org/richfaces/demo/DataBean.java 2010-07-06
17:04:49 UTC (rev 17748)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.richfaces.demo;
+
+import java.text.DateFormatSymbols;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+import java.util.Locale;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+@ManagedBean
+@SessionScoped
+public class DataBean {
+
+ private List<String> monthsData;
+
+ public DataBean() {
+ super();
+
+ DateFormatSymbols symbols = DateFormatSymbols.getInstance(Locale.US);
+ monthsData = new ArrayList<String>();
+ String[] monthSymbols = symbols.getMonths();
+ for (int i = Calendar.JANUARY; i <= Calendar.DECEMBER; i++) {
+ monthsData.add(monthSymbols[i]);
+ }
+ }
+
+ public List<String> getMonthsData() {
+ return monthsData;
+ }
+}
Added: root/examples-sandbox/trunk/components/combobox-demo/src/main/webapp/index.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/combobox-demo/src/main/webapp/index.xhtml
(rev 0)
+++
root/examples-sandbox/trunk/components/combobox-demo/src/main/webapp/index.xhtml 2010-07-06
17:04:49 UTC (rev 17748)
@@ -0,0 +1,57 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:combo="http://richfaces.org/combobox">
+<f:view contentType="text/html" />
+
+<h:head>
+ <title>Richfaces ComboBox</title>
+</h:head>
+
+<h:body style="margin: 30px;">
+
+ <h:form id="form">
+ <div style="height: 300px; width: 300px; overflow: auto;">Text
+ block text block text block text block text block text block text
+ block text block
+
+ <combo:comboBox autocompleteList="#{dataBean.monthsData}" />
+
+ <br />
+ <select style="width: 200px">
+ <option>ccccc</option>
+ </select> text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block text block text block text block text
+ block text block text block
+ </div>
+ </h:form>
+</h:body>
+</html>