Author: abelevich
Date: 2008-02-19 11:30:49 -0500 (Tue, 19 Feb 2008)
New Revision: 6173
Added:
trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/pages/index.xhtml
Modified:
trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp
Log:
extended sample
Modified:
trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-02-19
16:14:48 UTC (rev 6172)
+++
trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/WEB-INF/faces-config.xml 2008-02-19
16:30:49 UTC (rev 6173)
@@ -2,9 +2,25 @@
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
- <managed-bean>
- <managed-bean-name>bean</managed-bean-name>
- <managed-bean-class>org.richfaces.Bean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
+ <navigation-rule>
+ <display-name>xhtml</display-name>
+ <navigation-case>
+ <from-outcome>xhtml</from-outcome>
+ <to-view-id>/faces/pages/index.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>jsp</from-outcome>
+ <to-view-id>/faces/pages/index.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.richfaces.Bean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <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>
</faces-config>
Modified: trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/WEB-INF/web.xml 2008-02-19
16:14:48 UTC (rev 6172)
+++ trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/WEB-INF/web.xml 2008-02-19
16:30:49 UTC (rev 6173)
@@ -2,14 +2,31 @@
<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>
+ </context-param>
<context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param> -->
+ <context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+</context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
Modified: trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp 2008-02-19
16:14:48 UTC (rev 6172)
+++ trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp 2008-02-19
16:30:49 UTC (rev 6173)
@@ -1,13 +1,26 @@
<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/ui/inplaceSelect"
prefix="ii"%>
+<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/ui/inplaceSelect"
prefix="is"%>
<html>
- <head>
+ <head>
<title></title>
- </head>
- <body>
- <f:view>
- <ii:inplaceSelect />
+ </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>
+ <is:inplaceSelect>
+ <f:selectItem itemLabel="option 1" itemValue="option 1"/>
+ <f:selectItem itemLabel="option 2" itemValue="option 2"/>
+ <f:selectItem itemLabel="option 3" itemValue="option 3"/>
+ <f:selectItem itemLabel="option 4" itemValue="option 4"/>
+ <f:selectItem itemLabel="option 5" itemValue="option 5"/>
+ </is:inplaceSelect>
+ </h:form>
</f:view>
- </body>
+ </body>
</html>
Added: trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/pages/index.xhtml
(rev 0)
+++
trunk/sandbox/samples/inplaceSelect-sample/src/main/webapp/pages/index.xhtml 2008-02-19
16:30:49 UTC (rev 6173)
@@ -0,0 +1,34 @@
+<!-- <!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:is="http://labs.jboss.com/jbossrichfaces/ui/ui/inplaceSelect&q...
+
+
+ <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>
+ <is:inplaceSelect>
+ <f:selectItem itemLabel="option 1" itemValue="option 1"/>
+ <f:selectItem itemLabel="option 2" itemValue="option 2"/>
+ <f:selectItem itemLabel="option 3" itemValue="option 3"/>
+ <f:selectItem itemLabel="option 4" itemValue="option 4"/>
+ <f:selectItem itemLabel="option 5" itemValue="option 5"/>
+ </is:inplaceSelect>
+ </h:form>
+ </f:view>
+ </body>
+
+</html>
+
\ No newline at end of file