Author: lfryc(a)redhat.com
Date: 2011-01-12 04:52:28 -0500 (Wed, 12 Jan 2011)
New Revision: 20960
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/body.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/headerFooter.xhtml
Removed:
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/header.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/list.xhtml
Log:
rich:columnGroup - initial samples (RF-730)
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java 2011-01-12
09:18:00 UTC (rev 20959)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java 2011-01-12
09:52:28 UTC (rev 20960)
@@ -55,7 +55,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes = Attributes.getComponentAttributesFromClass(UIColumnGroup.class,
getClass());
+ attributes =
Attributes.getComponentAttributesFromFacesConfig(UIColumnGroup.class, getClass());
attributes.setAttribute("rendered", true);
}
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/body.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/body.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/body.xhtml 2011-01-12
09:52:28 UTC (rev 20960)
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:dataTable id="richDataTable" rows="10"
value="#{model.employees}" var="record">
+
+ <rich:column colspan="3">
+ <h:outputText value="#{record.name}" />
+ </rich:column>
+
+ <rich:columnGroup>
+ <rich:column>
+ <h:outputText value="#{record.title}" />
+ </rich:column>
+
+ <rich:column id="columnFavoriteColor">
+ <h:outputText value="#{record.favoriteColor}" />
+ </rich:column>
+ </rich:columnGroup>
+
+ </rich:dataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richColumnGroupBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Deleted:
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/header.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/header.xhtml 2011-01-12
09:18:00 UTC (rev 20959)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/header.xhtml 2011-01-12
09:52:28 UTC (rev 20960)
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!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:metamer="http://java.sun.com/jsf/composite/metamer"
-
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
-
- <!--
-JBoss, Home of Professional Open Source
-Copyright 2010, Red Hat, Inc. and individual contributors
-by the @authors tag. See the copyright.txt in the distribution for a
-full listing of individual contributors.
-
-This is free software; you can redistribute it and/or modify it
-under the terms of the GNU Lesser General Public License as
-published by the Free Software Foundation; either version 2.1 of
-the License, or (at your option) any later version.
-
-This software is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this software; if not, write to the Free
-Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- -->
-
- <ui:composition template="/templates/template.xhtml">
-
- <ui:define name="head">
- <f:metadata>
- <f:viewParam name="templates"
value="#{templateBean.templates}">
- <f:converter converterId="templatesListConverter" />
- </f:viewParam>
- </f:metadata>
- </ui:define>
-
- <ui:define name="outOfTemplateBefore">
- </ui:define>
-
- <ui:define name="component">
-
- <rich:dataTable id="richDataTable" rows="10"
value="#{model.employees}" var="record">
-
- <f:facet name="header">
- <rich:columnGroup id="columnGroup"
-
breakBefore="#{richColumnGroupBean.attributes['breakBefore'].value}"
-
rendered="#{richColumnGroupBean.attributes['rendered'].value}">
- <rich:column id="colHeaderName"
rowspan="2">
- <h:outputText id="colHeaderNameText"
value="Name" />
- </rich:column>
- <rich:column id="colHeaderInfo"
colspan="4">
- <h:outputText id="colHeaderInfoText"
value="Information" />
- </rich:column>
- <rich:column id="colHeaderTitle"
breakRowBefore="true">
- <h:outputText id="colHeaderTitleText"
value="Title" />
- </rich:column>
- <rich:column id="colHeaderSmoker">
- <h:outputText id="colHeaderSmokerText"
value="Smoker" />
- </rich:column>
- <rich:column id="colHeaderColor">
- <h:outputText id="colHeaderColorText"
value="Favorite Color" />
- </rich:column>
- <rich:column id="colHeaderNumberOfKids">
- <h:outputText id="colHeaderNumberOfKidsText"
value="Number of Kids" />
- </rich:column>
- </rich:columnGroup>
- </f:facet>
-
- <rich:column id="columnName">
- <h:outputText value="#{record.name}" />
- </rich:column>
-
- <rich:column id="columnTitle">
- <h:outputText value="#{record.title}" />
- </rich:column>
-
- <rich:column id="columnSmoker">
- <h:selectBooleanCheckbox id="smokerCheckbox"
value="#{record.smoker}">
- <a4j:ajax/>
- </h:selectBooleanCheckbox>
- </rich:column>
-
- <rich:column id="columnFavoriteColor">
- <h:outputText value="#{record.favoriteColor}" />
- </rich:column>
-
- <rich:column id="columnNumberOfKids">
- <rich:inputNumberSpinner id="numberOfKidsSpinner"
value="#{record.numberOfKids}">
- <a4j:ajax/>
- </rich:inputNumberSpinner>
- </rich:column>
-
- <f:facet name="footer">
- <rich:dataScroller id="scroller2"
for="richDataTable" page="#{richColumnGroupBean.page}"
maxPages="7" render="richDataTable" />
- </f:facet>
-
- </rich:dataTable>
- </ui:define>
-
- <ui:define name="outOfTemplateAfter">
- <metamer:attributes value="#{richColumnGroupBean.attributes}"
id="attributes" />
- </ui:define>
-
- </ui:composition>
-</html>
\ No newline at end of file
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/headerFooter.xhtml
(from rev 20949,
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/header.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/headerFooter.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/headerFooter.xhtml 2011-01-12
09:52:28 UTC (rev 20960)
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:dataTable id="richDataTable" rows="10"
value="#{model.employees}" var="record">
+
+ <f:facet name="header">
+
+
+ <rich:columnGroup id="columnGroup"
+
rendered="#{richColumnGroupBean.attributes['rendered'].value}">
+ <rich:column id="colHeaderName"
rowspan="2">
+ <h:outputText id="colHeaderNameText"
value="Name" />
+ </rich:column>
+ <rich:column id="colHeaderInfo"
colspan="4">
+ <h:outputText id="colHeaderInfoText"
value="Information" />
+ </rich:column>
+ <rich:column id="colHeaderTitle"
breakRowBefore="true">
+ <h:outputText id="colHeaderTitleText"
value="Title" />
+ </rich:column>
+ <rich:column id="colHeaderSmoker">
+ <h:outputText id="colHeaderSmokerText"
value="Smoker" />
+ </rich:column>
+ <rich:column id="colHeaderColor">
+ <h:outputText id="colHeaderColorText"
value="Favorite Color" />
+ </rich:column>
+ <rich:column id="colHeaderNumberOfKids">
+ <h:outputText id="colHeaderNumberOfKidsText"
value="Number of Kids" />
+ </rich:column>
+ </rich:columnGroup>
+
+ </f:facet>
+
+ <rich:column id="columnName">
+ <h:outputText value="#{record.name}" />
+ </rich:column>
+
+ <rich:column id="columnTitle">
+ <h:outputText value="#{record.title}" />
+ </rich:column>
+
+ <rich:column id="columnSmoker">
+ <h:selectBooleanCheckbox id="smokerCheckbox"
value="#{record.smoker}">
+ <a4j:ajax/>
+ </h:selectBooleanCheckbox>
+ </rich:column>
+
+ <rich:column id="columnFavoriteColor">
+ <h:outputText value="#{record.favoriteColor}" />
+ </rich:column>
+
+ <rich:column id="columnNumberOfKids">
+ <rich:inputNumberSpinner id="numberOfKidsSpinner"
value="#{record.numberOfKids}">
+ <a4j:ajax/>
+ </rich:inputNumberSpinner>
+ </rich:column>
+
+ <f:facet name="footer">
+
+
+ <rich:columnGroup id="columnGroup1"
+
rendered="#{richColumnGroupBean.attributes['rendered'].value}">
+ <rich:column colspan="5">
+ <rich:dataScroller />
+ </rich:column>
+ <rich:column id="colHeaderName1"
rowspan="2" breakRowBefore="true">
+ <h:outputText id="colHeaderNameText1"
value="Name" />
+ </rich:column>
+ <rich:column id="colHeaderTitle1" >
+ <h:outputText id="colHeaderTitleText1"
value="Title" />
+ </rich:column>
+ <rich:column id="colHeaderSmoker1">
+ <h:outputText id="colHeaderSmokerText1"
value="Smoker" />
+ </rich:column>
+ <rich:column id="colHeaderColor1">
+ <h:outputText id="colHeaderColorText1"
value="Favorite Color" />
+ </rich:column>
+ <rich:column id="colHeaderNumberOfKids1">
+ <h:outputText id="colHeaderNumberOfKidsText1"
value="Number of Kids" />
+ </rich:column>
+ <rich:column id="colHeaderInfo1"
colspan="4" breakRowBefore="true">
+ <h:outputText id="colHeaderInfoText1"
value="Information" />
+ </rich:column>
+ </rich:columnGroup>
+
+ </f:facet>
+
+ </rich:dataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richColumnGroupBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/list.xhtml 2011-01-12
09:18:00 UTC (rev 20959)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/list.xhtml 2011-01-12
09:52:28 UTC (rev 20960)
@@ -31,9 +31,13 @@
<ui:define name="links">
- <metamer:testPageLink id="header" outcome="header"
value="Header">
- Simple page that contains a table using
<b>rich:columnGroup</b> and input boxes for all its attributes.
+ <metamer:testPageLink id="headerFooter"
outcome="headerFooter" value="Header and Footer">
+ <b>rich:columnGroup</b> in the header and footer facets of
the table
</metamer:testPageLink>
+
+ <metamer:testPageLink id="body" outcome="body"
value="Body">
+ <b>rich:columnGroup</b> in the body of the table
+ </metamer:testPageLink>
</ui:define>