Author: ilya_shaikovsky
Date: 2008-03-20 11:59:47 -0400 (Thu, 20 Mar 2008)
New Revision: 7016
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/selectItems.xhtml
Removed:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/collection.xhtml
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/simple.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/usage.xhtml
Log:
Deleted:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/collection.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/collection.xhtml 2008-03-20
15:54:41 UTC (rev 7015)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/collection.xhtml 2008-03-20
15:59:47 UTC (rev 7016)
@@ -1,10 +0,0 @@
-<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
-
- <rich:comboBox value="#{comboBoxBean.value}"
suggestionValues="#{capitalsBean.capitalsNames}"/>
-
-</ui:composition>
\ No newline at end of file
Copied:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/selectItems.xhtml
(from rev 6984,
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/collection.xhtml)
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/selectItems.xhtml
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/selectItems.xhtml 2008-03-20
15:59:47 UTC (rev 7016)
@@ -0,0 +1,13 @@
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+ <rich:comboBox selectFirstOnUpdate="false"
+ defaultLabel="Enter some value">
+ <f:selectItems value="#{capitalsBean.capitalsOptions}" />
+ </rich:comboBox>
+
+</ui:composition>
\ No newline at end of file
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/simple.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/simple.xhtml 2008-03-20
15:54:41 UTC (rev 7015)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/examples/simple.xhtml 2008-03-20
15:59:47 UTC (rev 7016)
@@ -5,8 +5,12 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <rich:comboBox value="#{comboBoxBean.value}">
- <f:selectItem itemValue="1"/>
+ <rich:comboBox defaultLabel="Enter some value">
+ <f:selectItem itemValue="suggestion 1"/>
+ <f:selectItem itemValue="suggestion 2"/>
+ <f:selectItem itemValue="suggestion 3"/>
+ <f:selectItem itemValue="suggestion 4"/>
+ <f:selectItem itemValue="suggestion 5"/>
</rich:comboBox>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/usage.xhtml 2008-03-20
15:54:41 UTC (rev 7015)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/comboBox/usage.xhtml 2008-03-20
15:59:47 UTC (rev 7016)
@@ -9,8 +9,24 @@
<ui:define name="sample">
<p>
- SHORT DESCRIPTION
- </p>
+ The component provides editable combobox element on the page.
+ </p>
+ <p><b>
+ Combo Box</b> is a simplified select based version of <i>Suggestion
Box</i> component.
+ </p>
+ <ul>
+ <li>uses client side suggestions</li>
+ <li>Declarative definition with f:selectItem(s) components.</li>
+ <li>Using list of string objects</li>
+ </ul>
+ <p>
+ Using selectItem(s) for suggestion definition you should define only value
+ of the selectItem. It will be used both for displaying and storing.
+ </p>
+ <p>
+ First simple example shows declarative definition with f:selectItem components.
+ Just enter <b>"s"</b> letter or click icon in order to trigger
the suggestion.
+ </p>
<div class="sample-container" >
<ui:include src="/richfaces/comboBox/examples/simple.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
@@ -18,17 +34,27 @@
</ui:include>
</div>
<p>
- DESCRIPTION
+ Next example uses simple select Items list to provide suggestions. Also comboBox
+ does not select first item by default after list appears
(<b>selectFirstOnUpdate </b>attribute
+ usage). Just enter any letter or click icon in order to trigger the suggestion.
</p>
<div class="sample-container" >
- <ui:include src="/richfaces/comboBox/examples/collection.xhtml"/>
+ <ui:include src="/richfaces/comboBox/examples/selectItems.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath"
value="/richfaces/comboBox/examples/collection.xhtml"/>
+ <ui:param name="sourcepath"
value="/richfaces/comboBox/examples/selectItems.xhtml"/>
</ui:include>
</div>
<p>
- DESCRIPTION
+ Next definition example shows simple String list usage to define suggestions list.
+ And input suggestion feature turned on with <b>directInputSuggestions
</b>attribute.
+ Enter any letter or click icon in order to trigger the suggestion.
</p>
+ <div class="sample-container" >
+ <ui:include src="/richfaces/comboBox/examples/collection.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/comboBox/examples/collection.xhtml"/>
+ </ui:include>
+ </div>
</ui:define>
</ui:composition>