Author: abelevich
Date: 2010-05-19 13:09:54 -0400 (Wed, 19 May 2010)
New Revision: 17133
Added:
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/SkinBean.java
root/examples-sandbox/trunk/components/tables/src/main/webapp/dataTable.xhtml
root/examples-sandbox/trunk/components/tables/src/main/webapp/index.xhtml
Removed:
root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
Modified:
root/examples-sandbox/trunk/components/tables/src/main/webapp/WEB-INF/web.xml
root/examples-sandbox/trunk/components/tables/src/main/webapp/index.jsp
Log:
Added:
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/SkinBean.java
===================================================================
---
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/SkinBean.java
(rev 0)
+++
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/SkinBean.java 2010-05-19
17:09:54 UTC (rev 17133)
@@ -0,0 +1,18 @@
+package org.richfaces.demo;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+@ManagedBean(name = "skinBean")
+@SessionScoped
+public class SkinBean {
+ private String skin = "classic";
+
+ public String getSkin() {
+ return skin;
+ }
+
+ public void setSkin(String skin) {
+ this.skin = skin;
+ }
+}
Modified: root/examples-sandbox/trunk/components/tables/src/main/webapp/WEB-INF/web.xml
===================================================================
---
root/examples-sandbox/trunk/components/tables/src/main/webapp/WEB-INF/web.xml 2010-05-19
16:46:24 UTC (rev 17132)
+++
root/examples-sandbox/trunk/components/tables/src/main/webapp/WEB-INF/web.xml 2010-05-19
17:09:54 UTC (rev 17133)
@@ -1,110 +1,108 @@
<?xml version='1.0' encoding='UTF-8'?>
-<!--
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ <!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright
+ 1997-2007 Sun Microsystems, Inc. All rights reserved. The contents of
+ this file are subject to the terms of either the GNU General Public
+ License Version 2 only ("GPL") or the Common Development and
+ Distribution License("CDDL") (collectively, the "License"). You
may
+ not use this file except in compliance with the License. You can
+ obtain a copy of the License at
+
https://glassfish.dev.java.net/public/CDDL+GPL.html or
+ glassfish/bootstrap/legal/LICENSE.txt. See the License for the
+ specific language governing permissions and limitations under the
+ License. When distributing the software, include this License Header
+ Notice in each file and include the License file at
+ glassfish/bootstrap/legal/LICENSE.txt. Sun designates this particular
+ file as subject to the "Classpath" exception as provided by Sun in the
+ GPL Version 2 section of the License file that accompanied this code.
+ If applicable, add the following below the License Header, with the
+ fields enclosed by brackets [] replaced by your own identifying
+ information: "Portions Copyrighted [year] [name of copyright owner]"
- Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
+ Contributor(s): If you wish your version of this file to be governed
+ by only the CDDL or only the GPL Version 2, indicate your decision by
+ adding "[Contributor] elects to include this software in this
+ distribution under the [CDDL or GPL Version 2] license." If you don't
+ indicate a single choice of license, a recipient has the option to
+ distribute your version of this file under either the CDDL, the GPL
+ Version 2 or to extend the choice of license to its licensees as
+ provided above. However, if you add GPL Version 2 code and therefore,
+ elected the GPL Version 2 license, then the option applies only if the
+ new code is made subject to such option by the copyright holder.
+ -->
- The contents of this file are subject to the terms of either the GNU
- General Public License Version 2 only ("GPL") or the Common Development
- and Distribution License("CDDL") (collectively, the "License").
You
- may not use this file except in compliance with the License. You can obtain
- a copy of the License at
https://glassfish.dev.java.net/public/CDDL+GPL.html
- or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
- language governing permissions and limitations under the License.
+<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- When distributing the software, include this License Header Notice in each
- file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- Sun designates this particular file as subject to the "Classpath" exception
- as provided by Sun in the GPL Version 2 section of the License file that
- accompanied this code. If applicable, add the following below the License
- Header, with the fields enclosed by brackets [] replaced by your own
- identifying information: "Portions Copyrighted [year]
- [name of copyright owner]"
+ <display-name></display-name>
+ <description></description>
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
- Contributor(s):
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
- If you wish your version of this file to be governed by only the CDDL or
- only the GPL Version 2, indicate your decision by adding "[Contributor]
- elects to include this software in this distribution under the [CDDL or GPL
- Version 2] license." If you don't indicate a single choice of license, a
- recipient has the option to distribute your version of this file under
- either the CDDL, the GPL Version 2 or to extend the choice of license to
- its licensees as provided above. However, if you add GPL Version 2 code
- and therefore, elected the GPL Version 2 license, then the option applies
- only if the new code is made subject to such option by the copyright
- holder.
--->
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING</param-name>
+ <param-value>enable</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
+ <param-value>enable</param-value>
+ </context-param>
-<web-app version="2.5"
-
xmlns="http://java.sun.com/xml/ns/javaee"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- <display-name></display-name>
- <description></description>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
<context-param>
- <param-name>org.richfaces.SKIN</param-name>
- <param-value>blueSky</param-value>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
</context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
- <context-param>
- <param-name>org.richfaces.CONTROL_SKINNING</param-name>
- <param-value>enable</param-value>
- </context-param>
- <context-param>
- <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
- <param-value>enable</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>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <context-param>
- <description>
+ <context-param>
+ <description>
Set this flag to true if you want the JavaServer Faces
Reference Implementation to validate the XML in your
faces-config.xml resources against the DTD. Default
value is false.
</description>
- <param-name>com.sun.faces.validateXml</param-name>
- <param-value>true</param-value>
- </context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
- <!-- Faces Servlet -->
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
- <!-- Faces Servlet Mapping -->
- <!--
+ <!-- Faces Servlet Mapping -->
+ <!--
- This mapping identifies a jsp page as having JSF content. If a
- request comes to the server for foo.faces, the container will
- send the request to the FacesServlet, which will expect a
- corresponding foo.jsp page to exist containing the content.
+ This mapping identifies a jsp page as having JSF content. If a request
+ comes to the server for foo.faces, the container will send the request
+ to the FacesServlet, which will expect a corresponding foo.jsp page to
+ exist containing the content.
+ -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
- -->
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- <url-pattern>*.jsf</url-pattern>
- </servlet-mapping>
-
</web-app>
Added: root/examples-sandbox/trunk/components/tables/src/main/webapp/dataTable.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/tables/src/main/webapp/dataTable.xhtml
(rev 0)
+++
root/examples-sandbox/trunk/components/tables/src/main/webapp/dataTable.xhtml 2010-05-19
17:09:54 UTC (rev 17133)
@@ -0,0 +1,143 @@
+<!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:rich="http://richfaces.org/rich"
+
xmlns:ds="http://richfaces.org/datascroller"
+
xmlns:cc="http://richfaces.org/componentControl">
+<f:view contentType="text/html" />
+
+<h:head>
+ <title>Richfaces Tables</title>
+</h:head>
+
+<h:body>
+ <h:form id="form1">
+ <ds:dataScroller id="scroller1" for="richTable"
+ page="#{dataBean.page}" maxPages="7"></ds:dataScroller>
+
+ <rich:dataTable keepSaved="true" id="richTable"
var="record"
+ rowKeyVar="rowKey" value="#{dataBean.employeeList}"
rows="20"
+ sortMode="single">
+ <f:facet name="caption">
+ <h:outputText id="captioFacet1" value="Caption Facet" />
+ </f:facet>
+ <f:facet name="header">
+ <h:outputText value="header facet" />
+ </f:facet>
+ <rich:column id="column_name" sortBy="#{record.name}"
+ sortIconAsc="resources/images/asc.gif"
+ sortIconDesc="resources/images/desc.gif"
+ sortIconUnsort="resources/images/unsort.gif">
+ <f:facet name="header">
+ <h:outputText id="columnHeader1" value="Column Header Facet"
/>
+ </f:facet>
+
+ <rich:toggleControl for="expandedSubTable"
+ expandControl="resources/images/+.gif"
+ collapseControl="resources/images/-.gif">
+
+ </rich:toggleControl>
+
+ <h:outputText value="#{record.name}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooter1" value="Column Footer Facet
1" />
+ </f:facet>
+ </rich:column>
+
+ <rich:column id="column_title" sortBy="#{record.title}"
+ sortIconAsc="resources/images/asc.gif"
+ sortIconDesc="resources/images/desc.gif"
+ sortIconUnsort="resources/images/unsort.gif">
+ <f:facet name="header">
+ <h:outputText id="columnHeader2" value="Column Header Facet
2" />
+ </f:facet>
+ <h:outputText value="#{record.title}" />
+ </rich:column>
+
+ <rich:column id="column_email">
+ <h:outputText value="#{record.EMail}" />
+ </rich:column>
+
+ <rich:subTable id="expandedSubTable" var="company"
+ value="#{record.companies}" rows="1" switchType="ajax"
+ expanded="true">
+ <f:facet name="header">
+ <ds:dataScroller id="subscroller" for="expandedSubTable"
+ maxPages="3"></ds:dataScroller>
+ </f:facet>
+
+ <f:facet name="footer">
+ <h:outputText value="footer" />
+ </f:facet>
+
+ <rich:column id="column_company_name">
+ <h:outputText value="#{company.name}" />
+ </rich:column>
+
+ <rich:column id="column_company_state">
+ <h:outputText value="#{company.state}" />
+ </rich:column>
+
+ <rich:column id="column_company_phone">
+ <h:outputText value="#{company.phone}" />
+ </rich:column>
+ </rich:subTable>
+
+ <f:facet name="footer">
+ <ds:dataScroller id="scroller3" for="richTable"
+ page="#{dataBean.page}"
maxPages="7"></ds:dataScroller>
+ </f:facet>
+
+ </rich:dataTable>
+
+ <br />
+
+ <!-- cc:componentControl event="click"
target="#{dataBean.target}" operation="#{dataBean.operation}">
+ <f:param name="event" value="event"/>
+ <cc:hashParam>
+ <f:param name="key1" value="value1"/>
+ <f:param name="key2" value="value2"/>
+ <f:param name="key3" value="value3"/>
+ <cc:hashParam name="nested1">
+ <f:param name="key11" value="value11"/>
+ </cc:hashParam>
+ </cc:hashParam>
+ <cc:hashParameter name="hashkey1">
+ <f:param name="keyhash1" value="value1"/>
+ <f:param name="keyhash2" value="value2"/>
+ </cc:hashParameter>
+ <h:commandButton value="richfaces1"/>
+ <h:commandButton value="richfaces2"/>
+ </cc:componentControl -->
+
+
+ <h:commandButton value="next">
+ <cc:componentControl event="click" target="form1:scroller1"
+ operation="switchToPage">
+ <f:param value="fastforward" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="previous">
+ <cc:componentControl event="click" target="form1:scroller1"
+ operation="previous" />
+ </h:commandButton>
+
+ <h:commandButton value="sort">
+ <cc:componentControl event="click" target="form1:richTable"
+ operation="sort">
+ <f:param value="column_title" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="unsort">
+ <cc:componentControl event="click" target="form1:richTable"
+ operation="sort">
+ </cc:componentControl>
+ </h:commandButton>
+
+ </h:form>
+</h:body>
+</html>
Deleted: root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2010-05-19
16:46:24 UTC (rev 17132)
+++ root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2010-05-19
17:09:54 UTC (rev 17133)
@@ -1,126 +0,0 @@
-<!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:rich="http://richfaces.org/rich"
-
xmlns:ds="http://richfaces.org/datascroller"
-
xmlns:cc="http://richfaces.org/componentControl"
-
- >
- <f:view contentType="text/html"/>
-
- <h:head>
- <title>Richfaces Tables</title>
- </h:head>
-
- <h:body>
- <h:form id="form1">
- <ds:dataScroller id="scroller1" for="richTable"
page="#{dataBean.page}" maxPages="7"></ds:dataScroller >
-
- <rich:dataTable keepSaved="true" id="richTable"
var="record" rowKeyVar="rowKey"
value="#{dataBean.employeeList}" rows="20"
sortMode="single">
- <f:facet name="caption">
- <h:outputText id="captioFacet1" value="Caption Facet" />
- </f:facet>
- <f:facet name="header">
- <h:outputText value="header facet"/>
- </f:facet>
- <rich:column id="column_name" sortBy="#{record.name}"
sortIconAsc="resources/images/asc.gif"
sortIconDesc="resources/images/desc.gif"
sortIconUnsort="resources/images/unsort.gif">
- <f:facet name="header">
- <h:outputText id="columnHeader1" value="Column Header
Facet"/>
- </f:facet>
-
- <rich:toggleControl for="expandedSubTable"
expandControl="resources/images/+.gif"
collapseControl="resources/images/-.gif">
-
- </rich:toggleControl>
-
- <h:outputText value="#{record.name}" />
- <f:facet name="footer">
- <h:outputText id="columnFooter1" value="Column Footer Facet
1"/>
- </f:facet>
- </rich:column>
-
- <rich:column id="column_title" sortBy="#{record.title}"
sortIconAsc="resources/images/asc.gif"
sortIconDesc="resources/images/desc.gif"
sortIconUnsort="resources/images/unsort.gif">
- <f:facet name="header">
- <h:outputText id="columnHeader2" value="Column Header Facet
2"/>
- </f:facet>
- <h:outputText value="#{record.title}" />
- </rich:column>
-
- <rich:column id="column_email">
- <h:outputText value="#{record.EMail}" />
- </rich:column>
-
- <rich:subTable id="expandedSubTable" var="company"
value="#{record.companies}" rows="1" switchType="ajax"
expanded="true">
- <f:facet name="header">
- <ds:dataScroller id="subscroller" for="expandedSubTable"
maxPages="3"></ds:dataScroller >
- </f:facet>
-
- <f:facet name="footer">
- <h:outputText value="footer"/>
- </f:facet>
-
- <rich:column id="column_company_name">
- <h:outputText value="#{company.name}" />
- </rich:column>
-
- <rich:column id="column_company_state">
- <h:outputText value="#{company.state}" />
- </rich:column>
-
- <rich:column id="column_company_phone">
- <h:outputText value="#{company.phone}" />
- </rich:column>
- </rich:subTable>
-
- <f:facet name="footer">
- <ds:dataScroller id="scroller3" for="richTable"
page="#{dataBean.page}" maxPages="7"></ds:dataScroller >
- </f:facet>
-
- </rich:dataTable>
-
- <br/>
-
- <!-- cc:componentControl event="click"
target="#{dataBean.target}" operation="#{dataBean.operation}">
- <f:param name="event" value="event"/>
- <cc:hashParam>
- <f:param name="key1" value="value1"/>
- <f:param name="key2" value="value2"/>
- <f:param name="key3" value="value3"/>
- <cc:hashParam name="nested1">
- <f:param name="key11" value="value11"/>
- </cc:hashParam>
- </cc:hashParam>
- <cc:hashParameter name="hashkey1">
- <f:param name="keyhash1" value="value1"/>
- <f:param name="keyhash2" value="value2"/>
- </cc:hashParameter>
- <h:commandButton value="richfaces1"/>
- <h:commandButton value="richfaces2"/>
- </cc:componentControl -->
-
-
- <h:commandButton value="next">
- <cc:componentControl event="click" target="form1:scroller1"
operation="switchToPage">
- <f:param value="fastforward"/>
- </cc:componentControl>
- </h:commandButton>
-
- <h:commandButton value="previous">
- <cc:componentControl event="click" target="form1:scroller1"
operation="previous"/>
- </h:commandButton>
-
- <h:commandButton value="sort">
- <cc:componentControl event="click" target="form1:richTable"
operation="sort">
- <f:param value="column_title"/>
- </cc:componentControl>
- </h:commandButton>
-
- <h:commandButton value="unsort">
- <cc:componentControl event="click" target="form1:richTable"
operation="sort">
- </cc:componentControl>
- </h:commandButton>
-
- </h:form>
- </h:body>
-</html>
Modified: root/examples-sandbox/trunk/components/tables/src/main/webapp/index.jsp
===================================================================
--- root/examples-sandbox/trunk/components/tables/src/main/webapp/index.jsp 2010-05-19
16:46:24 UTC (rev 17132)
+++ root/examples-sandbox/trunk/components/tables/src/main/webapp/index.jsp 2010-05-19
17:09:54 UTC (rev 17133)
@@ -1,5 +1,4 @@
<html>
<body>
-<h2>Hello World!</h2>
-</body>
+ <jsp:forward page="index.jsf" /></body>
</html>
Added: root/examples-sandbox/trunk/components/tables/src/main/webapp/index.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/tables/src/main/webapp/index.xhtml
(rev 0)
+++ root/examples-sandbox/trunk/components/tables/src/main/webapp/index.xhtml 2010-05-19
17:09:54 UTC (rev 17133)
@@ -0,0 +1,33 @@
+<!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">
+<h:head>
+</h:head>
+<h:body>
+ <h4>Iteration Components Sample</h4>
+ <ul>
+ <li><h:link
outcome="dataTable">rich:DataTable</h:link></li>
+ <li><h:link
outcome="extendedtable">rich:extendedDataTable</h:link></li>
+ <li><h:link outcome="filteringAndSorting">filtering and sorting
feature</h:link></li>
+ </ul>
+
+ <h:form>
+ <h:panelGrid columns="3">
+ <h:commandButton value="Classic">
+ <f:setPropertyActionListener target="#{skinBean.skin}"
+ value="classic" />
+ </h:commandButton>
+ <h:commandButton value="BlueSky">
+ <f:setPropertyActionListener target="#{skinBean.skin}"
+ value="blueSky" />
+ </h:commandButton>
+ <h:commandButton value="DeepMarine">
+ <f:setPropertyActionListener target="#{skinBean.skin}"
+ value="deepMarine" />
+ </h:commandButton>
+ </h:panelGrid>
+ </h:form>
+</h:body>
+</html>
\ No newline at end of file