Author: abelevich
Date: 2010-10-08 09:08:18 -0400 (Fri, 08 Oct 2010)
New Revision: 19501
Added:
trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputBean.java
trunk/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml
Modified:
trunk/examples/input-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml
trunk/examples/input-demo/src/main/webapp/templates/template.xhtml
Log:
inplaceSelect developer sample
Added: trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputBean.java
===================================================================
--- trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputBean.java
(rev 0)
+++ trunk/examples/input-demo/src/main/java/org/richfaces/demo/InputBean.java 2010-10-08
13:08:18 UTC (rev 19501)
@@ -0,0 +1,20 @@
+package org.richfaces.demo;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+
+@SessionScoped
+@ManagedBean(name = "inputBean")
+public class InputBean {
+
+ private String value;
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+}
Modified: trunk/examples/input-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-10-08 12:42:30
UTC (rev 19500)
+++ trunk/examples/input-demo/src/main/webapp/WEB-INF/faces-config.xml 2010-10-08 13:08:18
UTC (rev 19501)
@@ -12,6 +12,10 @@
<to-view-id>/examples/inplaceInput.xhtml</to-view-id>
</navigation-case>
<navigation-case>
+ <from-outcome>inplaceSelect</from-outcome>
+ <to-view-id>/examples/inplaceSelect.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
<from-outcome>inputNumberSlider</from-outcome>
<to-view-id>/examples/inputNumberSlider.xhtml</to-view-id>
</navigation-case>
Modified: trunk/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml 2010-10-08
12:42:30 UTC (rev 19500)
+++ trunk/examples/input-demo/src/main/webapp/examples/inplaceInput.xhtml 2010-10-08
13:08:18 UTC (rev 19501)
@@ -12,7 +12,7 @@
<h:body>
<h:form id="form">
- <in:inplaceInput showControls="false" value="New York"/>
+ <in:inplaceInput showControls="true" value="New York"/>
<h:commandButton value="submit"/>
</h:form>
</h:body>
Added: trunk/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml
(rev 0)
+++ trunk/examples/input-demo/src/main/webapp/examples/inplaceSelect.xhtml 2010-10-08
13:08:18 UTC (rev 19501)
@@ -0,0 +1,35 @@
+<!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:in="http://richfaces.org/input">
+<f:view contentType="text/html" />
+
+<h:head>
+ <title>InplaceInput</title>
+</h:head>
+
+
+<h:body>
+ <h:form id="form">
+ <div id="scroll" style="width: 400px; height:400px;
overflow:auto;" >
+ <fieldset>
+ <legend>Test App</legend>
+ Fresh off his victory in the Florida primary, Sen. John McCain is poised to take
another big prize. Former
+ <in:inplaceSelect defaultLabel="Edit Text"
value="#{inputBean.value}">
+ <f:selectItem itemLabel="1#OptionLabel"
itemValue="1#OptionValue"/>
+ <f:selectItem itemLabel="2#OptionLabel"
itemValue="2#OptionValue"/>
+ <f:selectItem itemLabel="3#OptionLabel"
itemValue="3#OptionValue"/>
+ <f:selectItem itemLabel="4#OptionLabel"
itemValue="4#OptionValue"/>
+ </in:inplaceSelect>
+ Mayor Rudy Giuliani plans to drop out and endorse McCain, two GOP sources said. That
would give McCain added momentum heading into a debate Wednesday and next week's Super
Tuesday contests
+ </fieldset>
+ <h:commandButton value="submit"></h:commandButton>
+ </div>
+ <h:panelGroup id="out">
+ <h:outputText value="Entered Value: #{inputBean.value}"/>
+ </h:panelGroup>
+ </h:form>
+</h:body>
+</html>
Modified: trunk/examples/input-demo/src/main/webapp/templates/template.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/templates/template.xhtml 2010-10-08 12:42:30
UTC (rev 19500)
+++ trunk/examples/input-demo/src/main/webapp/templates/template.xhtml 2010-10-08 13:08:18
UTC (rev 19501)
@@ -32,6 +32,7 @@
<p>Input Component's Examples</p>
<ul>
<li><h:commandLink value="rich:inplaceInput"
action="inplaceInput" /></li>
+ <li><h:commandLink value="rich:inplaceSelect"
action="inplaceSelect" /></li>
<li><h:commandLink value="rich:inputNumberSlider"
action="inputNumberSlider" /></li>
<li><h:commandLink value="rich:inputNumberSpinner"
action="inputNumberSpinner" /></li>
<li><h:commandLink value="rich:autocomplete"
action="autocomplete" /></li>