Author: abelevich
Date: 2008-02-04 11:43:09 -0500 (Mon, 04 Feb 2008)
New Revision: 5790
Modified:
trunk/sandbox/samples/combobox-sample/src/main/java/org/richfaces/samples/Bean.java
trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.xhtml
Log:
Modified:
trunk/sandbox/samples/combobox-sample/src/main/java/org/richfaces/samples/Bean.java
===================================================================
---
trunk/sandbox/samples/combobox-sample/src/main/java/org/richfaces/samples/Bean.java 2008-02-04
16:28:46 UTC (rev 5789)
+++
trunk/sandbox/samples/combobox-sample/src/main/java/org/richfaces/samples/Bean.java 2008-02-04
16:43:09 UTC (rev 5790)
@@ -35,17 +35,17 @@
*/
public class Bean {
- String suggestions =
"Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,Florida,Maryland,Massachusetts,Michigan,Georgia,Hawaii,Idaho,Indiana,Iowa,Kansas,Kentucky,Louisiana,Maine,Minnesota,Mississippi,Missouri,Montana,Nebraska";
+ String suggestions =
"Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,Florida,Massachusetts,Michigan,Georgia,Hawaii,Idaho,Indiana,Iowa,Kansas,Kentucky,Louisiana,Maine,Minnesota,Mississippi,Missouri,Montana,Nebraska";
List selectItems = new ArrayList();
private boolean disabled = false;
- private boolean enableManualInput = false;
+ private boolean enableManualInput = true;
private boolean selectFirstOnUpdate = true;
private boolean filterNewValues = true;
private boolean directInputSuggestions = true;
- private String defaultMessage = "default message ...";
- private String width = "150px";
- private String listWidth = "150px";
- private String listHeight = "100px";
+ private String defaultMessage = "South Carolina";
+ private String width;
+ private String listWidth;
+ private String listHeight;
private String inputSize;
private String onchangeScript;
private String onlistcallScript;
Modified: trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-02-04
16:28:46 UTC (rev 5789)
+++
trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-02-04
16:43:09 UTC (rev 5790)
@@ -12,5 +12,17 @@
<managed-bean-name>skinBean</managed-bean-name>
<managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
-</managed-bean>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>carsManager</managed-bean-name>
+ <managed-bean-class>org.richfaces.samples.CarsManager</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <converter>
+ <converter-id>carConverter</converter-id>
+
<converter-class>org.richfaces.samples.converter.CarConverter</converter-class>
+ </converter>
+
+
</faces-config>
Modified: trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/web.xml 2008-02-04
16:28:46 UTC (rev 5789)
+++ trunk/sandbox/samples/combobox-sample/src/main/webapp/WEB-INF/web.xml 2008-02-04
16:43:09 UTC (rev 5790)
@@ -2,7 +2,7 @@
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Archetype Created Web Application</display-name>
- <!--
+
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
@@ -10,7 +10,7 @@
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
- </context-param> -->
+ </context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
Modified: trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.jsp 2008-02-04
16:28:46 UTC (rev 5789)
+++ trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.jsp 2008-02-04
16:43:09 UTC (rev 5790)
@@ -58,13 +58,7 @@
</h:panelGrid>
- <cmb:comboBox disabled="false">
- <f:selectItem itemValue="Oregon"/>
- <f:selectItem itemValue="Pennsylvania"/>
- <f:selectItem itemValue="Rhode Island"/>
- <f:selectItem itemValue="South Carolina"/>
- </cmb:comboBox>
-
+
<cmb:comboBox
disabled="#{bean.disabled}"
inputClass="inputClass"
@@ -88,16 +82,12 @@
onitemselected="#{bean.onitemselectedScript}">
<f:selectItems value="#{bean.selectItems}"/>
<f:selectItem itemValue="Oregon"/>
- <f:selectItem itemValue="Pennsylvania"/>
+ <f:selectItem itemValue="Pennsylvania Oregonfdsf fdsfdsfds dsffdsfdsfdsf
fdsfdsfwdsfsfsd fdsfdsfdsfds dfsfdsfdsfds"/>
<f:selectItem itemValue="Rhode Island"/>
<f:selectItem itemValue="South Carolina"/>
+
</cmb:comboBox>
- <cmb:comboBox disabled="false">
- <f:selectItem itemValue="Oregon"/>
- <f:selectItem itemValue="Pennsylvania"/>
- <f:selectItem itemValue="Rhode Island"/>
- <f:selectItem itemValue="South Carolina"/>
- </cmb:comboBox>
+
<br/>
<h:commandButton action="none"
value="submit"></h:commandButton>
<br>
Modified: trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.xhtml 2008-02-04
16:28:46 UTC (rev 5789)
+++ trunk/sandbox/samples/combobox-sample/src/main/webapp/pages/index.xhtml 2008-02-04
16:43:09 UTC (rev 5790)
@@ -1,24 +1,99 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd">
-
+<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -->
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:cb="http://labs.jboss.com/jbossrichfaces/ui/ui/combobox">
+
xmlns:cmb="http://labs.jboss.com/jbossrichfaces/ui/ui/combobox"...
-
- <head></head>
- <body>
- <f:view>
- <h:form>
- <cb:comboBox>
- <f:selectItem itemValue="Oregon"/>
- <f:selectItem itemValue="Pennsylvania"/>
- <f:selectItem itemValue="Rhode Island"/>
- <f:selectItem itemValue="South Carolina"/>
- </cb:comboBox>
-
- </h:form>
- </f:view>
- </body>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ <h:form>
+ <h:selectOneRadio binding="#{skinBean.component}" />
+ <h:commandLink action="#{skinBean.change}" value="set skin"
/>
+ <h:outputText value="Current skin: #{skinBean.skin}"/><br />
+ </h:form>
+
+ <h:form>
+ <h:panelGrid columns="2">
+ <h:outputText value="is disable (default: false):" />
+ <h:selectBooleanCheckbox value="#{bean.disabled}" />
+
+ <h:outputText value="enableManualInput (default: false):" />
+ <h:selectBooleanCheckbox value="#{bean.enableManualInput}" />
+
+ <h:outputText value="selectFirstOnUpdate (default: true):" />
+ <h:selectBooleanCheckbox value="#{bean.selectFirstOnUpdate}" />
+
+ <h:outputText value="filterNewValues (default: true):" />
+ <h:selectBooleanCheckbox value="#{bean.filterNewValues}" />
+
+ <h:outputText value="directInputSuggestions (default: true):" />
+ <h:selectBooleanCheckbox value="#{bean.directInputSuggestions}" />
+
+ <h:outputText value="defaultMessage is:" />
+ <h:inputText value="#{bean.defaultMessage}" />
+
+ <h:outputText value="width (in 'px'):" />
+ <h:inputText value="#{bean.width}" />
+
+ <h:outputText value="listWidth (in 'px'):" />
+ <h:inputText value="#{bean.listWidth}" />
+
+ <h:outputText value="listHeight (in 'px'):" />
+ <h:inputText value="#{bean.listHeight}" />
+
+ <h:outputText value="inputSize:" />
+ <h:inputText value="#{bean.inputSize}" />
+
+ <h:outputText value="onchange event script:" />
+ <h:inputText value="#{bean.onchangeScript}" />
+
+ <h:outputText value="onlistcall event script:" />
+ <h:inputText value="#{bean.onlistcallScript}" />
+
+ <h:outputText value="onitemselected event script:" />
+ <h:inputText value="#{bean.onitemselectedScript}" />
+
+ </h:panelGrid>
+ <cmb:comboBox
+ disabled="#{bean.disabled}"
+ inputClass="inputClass"
+ buttonDisabledClass="buttonDisabledClass"
+ buttonClass="buttonClass"
+ listClass="listClass"
+ value="#{bean.state}"
+ valueChangeListener="#{bean.selectionChanged}"
+ suggestionValues="#{bean.suggestions}"
+ width = "#{bean.width}"
+ listWidth="#{bean.listWidth}"
+ listHeight="#{bean.listHeight}"
+ enableManualInput="#{bean.enableManualInput}"
+ selectFirstOnUpdate="#{bean.selectFirstOnUpdate}"
+ filterNewValues="#{bean.filterNewValues}"
+ directInputSuggestions="#{bean.directInputSuggestions}"
+ defaultLabel="#{bean.defaultMessage}"
+ inputSize="#{bean.inputSize}"
+ onchange="#{bean.onchangeScript}"
+ onlistcall="#{bean.onlistcallScript}"
+ onitemselected="#{bean.onitemselectedScript}">
+ <f:selectItems value="#{bean.selectItems}"/>
+ <f:selectItem itemValue="Oregon"/>
+ <f:selectItem itemValue="Pennsylvania"/>
+ <f:selectItem itemValue="Rhode Island
gsdfgsdgdsgdsgdsgdsggdsgsdgdsgdsgdsgdsgdsgdsgdsgds"/>
+ <f:selectItem itemValue="South Carolina"/>
+
+ </cmb:comboBox>
+
+ <br/>
+ <h:commandButton action="none"
value="submit"></h:commandButton>
+ <br/>
+ <h:outputText value="Selected state is:
#{bean.state}"></h:outputText>
+ </h:form>
+ </f:view>
+ </body>
</html>
\ No newline at end of file