Author: dmorozov
Date: 2008-09-01 11:05:49 -0400 (Mon, 01 Sep 2008)
New Revision: 10261
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-4340
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-09-01
11:18:37 UTC (rev 10260)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/suggestionBox/examples/custom.xhtml 2008-09-01
15:05:49 UTC (rev 10261)
@@ -5,8 +5,6 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <div id="myDiv"></div>
-
<script type="text/javascript">//<![CDATA[
function processObjectsChange(suggestionBox) {
var items = suggestionBox.getSelectedItems();
@@ -40,87 +38,106 @@
}
}
//]]></script>
-
+
+ <style type="text/css">
+ .sb_test_column1 {
+ vertical-align: top;
+ text-align: left;
+ padding-right: 5px;
+ }
+ .sb_test_column2 {
+ vertical-align: middle;
+ text-align: center;
+ padding-left: 5px;
+ }
+ </style>
+
<h:form id="suggestionbox_form">
-
- <p>
- Suggestion Box will suggest you states capitals names. Comma and square brackets
could be used as suggestions separators."
- </p>
- <h:inputText value="#{capitalsBean.capital}" id="text" />
- <rich:suggestionbox id="suggestionBoxId" for="text"
tokens=",[]"
- rules="#{suggestionBox.rules}"
- suggestionAction="#{capitalsBean.autocomplete}" var="result"
- fetchValue="#{result.name}" rows="#{suggestionBox.intRows}"
- first="#{suggestionBox.intFirst}"
- minChars="#{suggestionBox.minchars}"
- shadowOpacity="#{suggestionBox.shadowOpacity}"
- border="#{suggestionBox.border}" width="#{suggestionBox.width}"
- height="#{suggestionBox.height}"
- shadowDepth="#{suggestionBox.shadowDepth}"
- cellpadding="#{suggestionBox.cellpadding}"
- nothingLabel="No capitals found" columnClasses="center"
- usingSuggestObjects="true"
- onobjectchange="processObjectsChange(suggestion)">
- <h:column>
- <h:graphicImage value="#{result.stateFlag}" />
- </h:column>
- <h:column>
- <h:outputText value="#{result.name}" />
- </h:column>
- <h:column>
- <h:outputText value="#{result.state}"
style="font-style:italic"/>
- </h:column>
- </rich:suggestionbox>
-
- <rich:spacer height="30px"/>
+ <p>Suggestion Box will suggest you states capitals names. Comma
+ and square brackets could be used as suggestions separators."</p>
+
+ <h:panelGrid columns="2"
columnClasses="sb_test_column1,sb_test_column2" width="100%">
+ <h:panelGroup>
+ <h:inputText value="#{capitalsBean.capital}" id="text" />
+ <rich:suggestionbox id="suggestionBoxId" for="text"
tokens=",[]"
+ rules="#{suggestionBox.rules}"
+ suggestionAction="#{capitalsBean.autocomplete}" var="result"
+ fetchValue="#{result.name}" rows="#{suggestionBox.intRows}"
+ first="#{suggestionBox.intFirst}"
+ minChars="#{suggestionBox.minchars}"
+ shadowOpacity="#{suggestionBox.shadowOpacity}"
+ border="#{suggestionBox.border}" width="#{suggestionBox.width}"
+ height="#{suggestionBox.height}"
+ shadowDepth="#{suggestionBox.shadowDepth}"
+ cellpadding="#{suggestionBox.cellpadding}"
+ nothingLabel="No capitals found" columnClasses="center"
+ usingSuggestObjects="true"
+ onobjectchange="processObjectsChange(suggestion)">
+
+ <h:column>
+ <h:graphicImage value="#{result.stateFlag}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{result.name}" />
+ </h:column>
+ <h:column>
+ <h:outputText value="#{result.state}"
style="font-style:italic" />
+ </h:column>
+ </rich:suggestionbox>
- <h:panelGrid columns="2" border="0" >
-
- <h:outputText value="Border" />
+ <rich:spacer height="30px" />
- <rich:inputNumberSlider minValue="1" maxValue="5"
- value="#{suggestionBox.border}">
- <a4j:support event="onchange" reRender="suggestionBoxId"
/>
- </rich:inputNumberSlider>
+ <h:panelGrid columns="2" border="0">
- <h:outputText value="Width" />
+ <h:outputText value="Border" />
- <rich:inputNumberSlider minValue="150" maxValue="350"
step="50"
- value="#{suggestionBox.width}">
- <a4j:support event="onchange" reRender="suggestionBoxId"
/>
- </rich:inputNumberSlider>
+ <rich:inputNumberSlider minValue="1" maxValue="5"
+ value="#{suggestionBox.border}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"
/>
+ </rich:inputNumberSlider>
+ <h:outputText value="Width" />
- <h:outputText value="Height" />
+ <rich:inputNumberSlider minValue="150" maxValue="350"
step="50"
+ value="#{suggestionBox.width}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"
/>
+ </rich:inputNumberSlider>
- <rich:inputNumberSlider minValue="100" maxValue="300"
step="50"
- value="#{suggestionBox.height}">
- <a4j:support event="onchange" reRender="suggestionBoxId"
/>
- </rich:inputNumberSlider>
- <h:outputText value="Shadow Depth" />
+ <h:outputText value="Height" />
- <rich:inputNumberSlider minValue="3" maxValue="6"
- value="#{suggestionBox.shadowDepth}">
- <a4j:support event="onchange" reRender="suggestionBoxId"
/>
- </rich:inputNumberSlider>
+ <rich:inputNumberSlider minValue="100" maxValue="300"
step="50"
+ value="#{suggestionBox.height}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"
/>
+ </rich:inputNumberSlider>
+ <h:outputText value="Shadow Depth" />
- <h:outputText value="Shadow Opacity" />
+ <rich:inputNumberSlider minValue="3" maxValue="6"
+ value="#{suggestionBox.shadowDepth}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"
/>
+ </rich:inputNumberSlider>
- <rich:inputNumberSlider minValue="1" maxValue="9"
- value="#{suggestionBox.shadowOpacity}">
- <a4j:support event="onchange" reRender="suggestionBoxId"
/>
- </rich:inputNumberSlider>
- <h:outputText value="Cellpadding" />
+ <h:outputText value="Shadow Opacity" />
- <rich:inputNumberSlider minValue="1" maxValue="20"
- value="#{suggestionBox.cellpadding}">
- <a4j:support event="onchange" reRender="suggestionBoxId"
/>
- </rich:inputNumberSlider>
+ <rich:inputNumberSlider minValue="1" maxValue="9"
+ value="#{suggestionBox.shadowOpacity}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"
/>
+ </rich:inputNumberSlider>
+ <h:outputText value="Cellpadding" />
+ <rich:inputNumberSlider minValue="1" maxValue="20"
+ value="#{suggestionBox.cellpadding}">
+ <a4j:support event="onchange" reRender="suggestionBoxId"
/>
+ </rich:inputNumberSlider>
+ </h:panelGrid>
+
+ </h:panelGroup>
+ <h:panelGroup>
+ <div id="myDiv"></div>
+ </h:panelGroup>
</h:panelGrid>
</h:form>