Author: lfryc(a)redhat.com
Date: 2011-01-10 03:09:52 -0500 (Mon, 10 Jan 2011)
New Revision: 20925
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/facets.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/filtering.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/scroller.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/sorting-using-column.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/sorting-using-component-control.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerlBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/simple.xhtml
Log:
rich:collapsibleSubTable preparation (RFPL-731)
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java 2011-01-10
06:13:31 UTC (rev 20924)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableBean.java 2011-01-10
08:09:52 UTC (rev 20925)
@@ -23,7 +23,9 @@
import java.io.Serializable;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
@@ -56,6 +58,9 @@
// true = model, false = empty table
private boolean state;
+ // facets
+ private Map<String, String> facets = new HashMap<String, String>();
+
/**
* Initializes the managed bean.
*/
@@ -64,7 +69,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes =
Attributes.getComponentAttributesFromClass(UICollapsibleSubTable.class, getClass());
+ attributes =
Attributes.getComponentAttributesFromFacesConfig(UICollapsibleSubTable.class,
getClass());
attributes.setAttribute("expandMode", "client");
attributes.setAttribute("expanded", true);
@@ -72,6 +77,9 @@
attributes.setAttribute("rows", 5);
// TODO these attributes have to be tested in another way
+ attributes.remove("filterVar");
+ attributes.remove("keepSaved");
+ attributes.remove("iterationStatusVar");
attributes.remove("componentState");
attributes.remove("rowKeyVar");
attributes.remove("stateVar");
@@ -128,4 +136,8 @@
this.state = state;
}
+ public Map<String, String> getFacets() {
+ return facets;
+ }
+
}
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerlBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerlBean.java 2011-01-10
06:13:31 UTC (rev 20924)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsibleSubTableTogglerlBean.java 2011-01-10
08:09:52 UTC (rev 20925)
@@ -64,7 +64,7 @@
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
- attributes =
Attributes.getComponentAttributesFromClass(UICollapsibleSubTableToggleControl.class,
getClass());
+ attributes =
Attributes.getComponentAttributesFromFacesConfig(UICollapsibleSubTableToggleControl.class,
getClass());
attributes.setAttribute("event", "click");
attributes.setAttribute("rendered", true);
// TODO these attributes have to be tested in another way
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/facets.xhtml
(from rev 20922,
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/simple.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/facets.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/facets.xhtml 2011-01-10
08:09:52 UTC (rev 20925)
@@ -0,0 +1,155 @@
+<?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">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox id="noDataCheckbox"
value="#{richSubTableBean.state}">
+ <a4j:ajax render="richDataTable"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:dataTable id="richDataTable"
value="#{richSubTableBean.lists}" var="list">
+ <f:facet name="header">
+ <rich:columnGroup id="columnGroup">
+ <rich:column id="columnHeaderEmployees"
colspan="3">
+ <h:outputText id="columnHeaderEmployeesText"
value="Employees" />
+ </rich:column>
+ <rich:column id="columnHeaderName"
breakRowBefore="true">
+ <h:outputText id="columnHeaderNameText"
value="Name" />
+ </rich:column>
+ <rich:column id="columnHeaderTitle">
+ <h:outputText id="columnHeaderTitleText"
value="Title" />
+ </rich:column>
+ <rich:column id="columnHeaderBirthdate">
+ <h:outputText id="columnHeaderBirthdateText"
value="Birthdate" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ <rich:column id="columnSubTable" colspan="3">
+ <rich:collapsibleSubTableToggler id="subTableTC"
for="richSubTable"/>
+ <h:outputText value="#{list[0].sex == 'MALE' ?
'Men' : 'Women'}" />
+ </rich:column>
+
+ <rich:collapsibleSubTable id="richSubTable"
+
breakBefore="#{richSubTableBean.attributes['breakBefore'].value}"
+
expandMode="#{richSubTableBean.attributes['expandMode'].value}"
+
expanded="#{richSubTableBean.attributes['expanded'].value}"
+
filterVar="#{richSubTableBean.attributes['filterVar'].value}"
+
filteringListeners="#{richSubTableBean.attributes['filteringListeners'].value}"
+
first="#{richSubTableBean.attributes['first'].value}"
+
footer="#{richSubTableBean.attributes['footer'].value}"
+
header="#{richSubTableBean.attributes['header'].value}"
+
iterationState="#{richSubTableBean.attributes['iterationState'].value}"
+
iterationStatusVar="#{richSubTableBean.attributes['iterationStatusVar'].value}"
+
keepSaved="#{richSubTableBean.attributes['keepSaved'].value}"
+
noData="#{richSubTableBean.attributes['noData'].value}"
+
noDataLabel="#{richSubTableBean.attributes['noDataLabel'].value}"
+
relativeRowIndex="#{richSubTableBean.attributes['relativeRowIndex'].value}"
+
rendered="#{richSubTableBean.attributes['rendered'].value}"
+
rowAvailable="#{richSubTableBean.attributes['rowAvailable'].value}"
+
rowCount="#{richSubTableBean.attributes['rowCount'].value}"
+
rowData="#{richSubTableBean.attributes['rowData'].value}"
+
rowIndex="#{richSubTableBean.attributes['rowIndex'].value}"
+
rowKey="#{richSubTableBean.attributes['rowKey'].value}"
+
rowKeyConverter="#{richSubTableBean.attributes['rowKeyConverter'].value}"
+
rows="#{richSubTableBean.attributes['rows'].value}"
+
selection="#{richSubTableBean.attributes['selection'].value}"
+
sortExpression="#{richSubTableBean.attributes['sortExpression'].value}"
+
sortMode="#{richSubTableBean.attributes['sortMode'].value}"
+
sortPriority="#{richSubTableBean.attributes['sortPriority'].value}"
+
sortingListeners="#{richSubTableBean.attributes['sortingListeners'].value}"
+
toggleListeners="#{richSubTableBean.attributes['toggleListeners'].value}"
+ value="#{richSubTableBean.state ? list :
null}"
+ var="item">
+
+ <f:facet name="noData">
+ <h:outputText id="noData"
value="#{richSubTableBean.facets['noData']}" style="color:
red;"
+ rendered="#{not empty
richSubTableBean.facets['noData']}"/>
+ </f:facet>
+
+ <f:facet name="header">
+ <h:outputText id="header"
value="#{richSubTableBean.facets['header']}"
+ rendered="#{not empty
richSubTableBean.facets['header']}" />
+ </f:facet>
+
+ <f:facet name="footer">
+ <h:outputText id="footer"
value="#{richSubTableBean.facets['footer']}"
+ rendered="#{not empty
richSubTableBean.facets['footer']}" />
+ </f:facet>
+
+ <rich:column id="columnName">
+ <h:outputText id="name"
value="#{item.name}" />
+ </rich:column>
+ <rich:column id="columnTitle">
+ <h:outputText id="title"
value="#{item.title}" />
+ </rich:column>
+ <rich:column id="columnBirthdate">
+ <h:outputText id="birthdate"
value="#{item.birthdate}">
+ <f:convertDateTime pattern="d MMM yyyy"/>
+ </h:outputText>
+ </rich:column>
+
+ </rich:collapsibleSubTable>
+ </rich:dataTable>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <a4j:ajax render="#{nestedComponentId}">
+ <h:panelGrid columns="2">
+ <h:outputLabel value="No Data Facet: " />
+ <h:inputText id="noDataInput"
value="#{richSubTableBean.facets['noData']}" />
+
+ <h:outputLabel value="Header Facet:" />
+ <h:inputText id="headerInput"
value="#{richSubTableBean.facets['header']}" />
+
+ <h:outputLabel value="Footer Facet:" />
+ <h:inputText id="footerInput"
value="#{richSubTableBean.facets['footer']}" />
+ </h:panelGrid>
+ </a4j:ajax>
+
+ <metamer:attributes value="#{richSubTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/filtering.xhtml
(from rev 20922,
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/simple.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/filtering.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/filtering.xhtml 2011-01-10
08:09:52 UTC (rev 20925)
@@ -0,0 +1,139 @@
+<?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">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox id="noDataCheckbox"
value="#{richSubTableBean.state}">
+ <a4j:ajax render="richDataTable"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:dataTable id="richDataTable"
value="#{richSubTableBean.lists}" var="list">
+ <f:facet name="header">
+ <rich:columnGroup id="columnGroup">
+ <rich:column id="columnHeaderEmployees"
colspan="3">
+ <h:outputText id="columnHeaderEmployeesText"
value="Employees" />
+ </rich:column>
+ <rich:column id="columnHeaderName"
breakRowBefore="true">
+ <h:outputText id="columnHeaderNameText"
value="Name" />
+ </rich:column>
+ <rich:column id="columnHeaderTitle">
+ <h:outputText id="columnHeaderTitleText"
value="Title" />
+ </rich:column>
+ <rich:column id="columnHeaderBirthdate">
+ <h:outputText id="columnHeaderBirthdateText"
value="Birthdate" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ <rich:column id="columnSubTable" colspan="3">
+ <rich:collapsibleSubTableToggler id="subTableTC"
for="richSubTable"/>
+ <h:outputText value="#{list[0].sex == 'MALE' ?
'Men' : 'Women'}" />
+ </rich:column>
+
+ <rich:collapsibleSubTable id="richSubTable"
+
breakBefore="#{richSubTableBean.attributes['breakBefore'].value}"
+
expandMode="#{richSubTableBean.attributes['expandMode'].value}"
+
expanded="#{richSubTableBean.attributes['expanded'].value}"
+
filterVar="#{richSubTableBean.attributes['filterVar'].value}"
+
filteringListeners="#{richSubTableBean.attributes['filteringListeners'].value}"
+
first="#{richSubTableBean.attributes['first'].value}"
+
footer="#{richSubTableBean.attributes['footer'].value}"
+
header="#{richSubTableBean.attributes['header'].value}"
+
iterationState="#{richSubTableBean.attributes['iterationState'].value}"
+
iterationStatusVar="#{richSubTableBean.attributes['iterationStatusVar'].value}"
+
keepSaved="#{richSubTableBean.attributes['keepSaved'].value}"
+
noData="#{richSubTableBean.attributes['noData'].value}"
+
noDataLabel="#{richSubTableBean.attributes['noDataLabel'].value}"
+
relativeRowIndex="#{richSubTableBean.attributes['relativeRowIndex'].value}"
+
rendered="#{richSubTableBean.attributes['rendered'].value}"
+
rowAvailable="#{richSubTableBean.attributes['rowAvailable'].value}"
+
rowCount="#{richSubTableBean.attributes['rowCount'].value}"
+
rowData="#{richSubTableBean.attributes['rowData'].value}"
+
rowIndex="#{richSubTableBean.attributes['rowIndex'].value}"
+
rowKey="#{richSubTableBean.attributes['rowKey'].value}"
+
rowKeyConverter="#{richSubTableBean.attributes['rowKeyConverter'].value}"
+
rows="#{richSubTableBean.attributes['rows'].value}"
+
selection="#{richSubTableBean.attributes['selection'].value}"
+
sortExpression="#{richSubTableBean.attributes['sortExpression'].value}"
+
sortMode="#{richSubTableBean.attributes['sortMode'].value}"
+
sortPriority="#{richSubTableBean.attributes['sortPriority'].value}"
+
sortingListeners="#{richSubTableBean.attributes['sortingListeners'].value}"
+
toggleListeners="#{richSubTableBean.attributes['toggleListeners'].value}"
+ value="#{richSubTableBean.state ? list :
null}"
+ var="item">
+
+ <f:facet name="header">
+ header facet
+ </f:facet>
+
+ <f:facet name="noData">
+ no data facet
+ </f:facet>
+
+ <rich:column id="columnName">
+ <h:outputText id="name"
value="#{item.name}" />
+ </rich:column>
+ <rich:column id="columnTitle">
+ <h:outputText id="title"
value="#{item.title}" />
+ </rich:column>
+ <rich:column id="columnBirthdate">
+ <h:outputText id="birthdate"
value="#{item.birthdate}">
+ <f:convertDateTime pattern="d MMM yyyy"/>
+ </h:outputText>
+ </rich:column>
+
+ <f:facet name="footer">
+ footer facet
+ </f:facet>
+
+ </rich:collapsibleSubTable>
+ </rich:dataTable>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richSubTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/list.xhtml 2011-01-10
06:13:31 UTC (rev 20924)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/list.xhtml 2011-01-10
08:09:52 UTC (rev 20925)
@@ -34,7 +34,15 @@
<metamer:testPageLink id="simple" outcome="simple"
value="Simple">
Page that contains a table with two
<b>rich:collapsibleSubTable</b>s with defined facets (header, footer, noData)
and input boxes for all its attributes.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="facets" outcome="facets"
value="Facets">
+ Simple page that contains <b>rich:collapsibleSubTable</b>
(with model containing employees) and all facets for this table updateable by Ajax.
+ </metamer:testPageLink>
+ <metamer:testPageLink id="scroller" outcome="scroller"
value="Data Scroller">
+ Page that contains <b>rich:collapsibleSubTable</b> (with
model containing employees), data scroller and input boxes for all its attributes.
+ </metamer:testPageLink>
+
<metamer:testPageLink id="components1"
outcome="components1" value="Various Components 1">
Page that contains a table with two
<b>rich:collapsibleSubTable</b>s (with model containing employees) and input
boxes for all its attributes.
<span style="color: red">TODO will be used with various
types of input and command components as soon as available</span>
@@ -45,6 +53,18 @@
<span style="color: red">TODO will be used with various
types of input and command components as soon as available</span>
</metamer:testPageLink>
+ <metamer:testPageLink id="sorting-using-component-control"
outcome="sorting-using-component-control" value="Table Sorting - Component
Control">
+ <b>rich:collapsibleSubTable</b> (with model containing
employees) sortable by <b>rich:componentControl</b>.
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="sorting-using-column"
outcome="sorting-using-column" value="Table Sorting - Column
based">
+ <b>rich:collapsibleSubTable</b> (with model containing
employees) with custom sorting by <b>rich:column</b>'s attribute @sortBy,
@sortOrder.
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="filtering"
outcome="filtering" value="Table Filtering">
+ Page that contains filterable <b>rich:collapsibleSubTable</b>
(with model containing employees) and input boxes for all its attributes filterable by its
columns.
+ </metamer:testPageLink>
+
</ui:define>
</ui:composition>
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/scroller.xhtml
(from rev 20922,
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/simple.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/scroller.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/scroller.xhtml 2011-01-10
08:09:52 UTC (rev 20925)
@@ -0,0 +1,131 @@
+<?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">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox id="noDataCheckbox"
value="#{richSubTableBean.state}">
+ <a4j:ajax render="richDataTable"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:dataTable id="richDataTable"
value="#{richSubTableBean.lists}" var="list">
+ <f:facet name="header">
+ <rich:columnGroup id="columnGroup">
+ <rich:column id="columnHeaderEmployees"
colspan="3">
+ <h:outputText id="columnHeaderEmployeesText"
value="Employees" />
+ </rich:column>
+ <rich:column id="columnHeaderName"
breakRowBefore="true">
+ <h:outputText id="columnHeaderNameText"
value="Name" />
+ </rich:column>
+ <rich:column id="columnHeaderTitle">
+ <h:outputText id="columnHeaderTitleText"
value="Title" />
+ </rich:column>
+ <rich:column id="columnHeaderBirthdate">
+ <h:outputText id="columnHeaderBirthdateText"
value="Birthdate" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ <rich:column id="columnSubTable" colspan="3">
+ <rich:collapsibleSubTableToggler id="subTableTC"
for="richSubTable"/>
+ <h:outputText value="#{list[0].sex == 'MALE' ?
'Men' : 'Women'}" />
+ </rich:column>
+
+ <rich:collapsibleSubTable id="richSubTable"
+
breakBefore="#{richSubTableBean.attributes['breakBefore'].value}"
+
expandMode="#{richSubTableBean.attributes['expandMode'].value}"
+
expanded="#{richSubTableBean.attributes['expanded'].value}"
+
filterVar="#{richSubTableBean.attributes['filterVar'].value}"
+
filteringListeners="#{richSubTableBean.attributes['filteringListeners'].value}"
+
first="#{richSubTableBean.attributes['first'].value}"
+
footer="#{richSubTableBean.attributes['footer'].value}"
+
header="#{richSubTableBean.attributes['header'].value}"
+
iterationState="#{richSubTableBean.attributes['iterationState'].value}"
+
iterationStatusVar="#{richSubTableBean.attributes['iterationStatusVar'].value}"
+
keepSaved="#{richSubTableBean.attributes['keepSaved'].value}"
+
noData="#{richSubTableBean.attributes['noData'].value}"
+
noDataLabel="#{richSubTableBean.attributes['noDataLabel'].value}"
+
relativeRowIndex="#{richSubTableBean.attributes['relativeRowIndex'].value}"
+
rendered="#{richSubTableBean.attributes['rendered'].value}"
+
rowAvailable="#{richSubTableBean.attributes['rowAvailable'].value}"
+
rowCount="#{richSubTableBean.attributes['rowCount'].value}"
+
rowData="#{richSubTableBean.attributes['rowData'].value}"
+
rowIndex="#{richSubTableBean.attributes['rowIndex'].value}"
+
rowKey="#{richSubTableBean.attributes['rowKey'].value}"
+
rowKeyConverter="#{richSubTableBean.attributes['rowKeyConverter'].value}"
+
rows="#{richSubTableBean.attributes['rows'].value}"
+
selection="#{richSubTableBean.attributes['selection'].value}"
+
sortExpression="#{richSubTableBean.attributes['sortExpression'].value}"
+
sortMode="#{richSubTableBean.attributes['sortMode'].value}"
+
sortPriority="#{richSubTableBean.attributes['sortPriority'].value}"
+
sortingListeners="#{richSubTableBean.attributes['sortingListeners'].value}"
+
toggleListeners="#{richSubTableBean.attributes['toggleListeners'].value}"
+ value="#{richSubTableBean.state ? list :
null}"
+ var="item">
+
+ <f:facet name="footer">
+ <rich:dataScroller id="scroller1"
for="richSubTable" maxPages="7" render="richDataTable"
/>
+ </f:facet>
+
+ <rich:column id="columnName">
+ <h:outputText id="name"
value="#{item.name}" />
+ </rich:column>
+ <rich:column id="columnTitle">
+ <h:outputText id="title"
value="#{item.title}" />
+ </rich:column>
+ <rich:column id="columnBirthdate">
+ <h:outputText id="birthdate"
value="#{item.birthdate}">
+ <f:convertDateTime pattern="d MMM yyyy"/>
+ </h:outputText>
+ </rich:column>
+
+ </rich:collapsibleSubTable>
+ </rich:dataTable>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richSubTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/simple.xhtml 2011-01-10
06:13:31 UTC (rev 20924)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/simple.xhtml 2011-01-10
08:09:52 UTC (rev 20925)
@@ -102,14 +102,6 @@
value="#{richSubTableBean.state ? list :
null}"
var="item">
- <f:facet name="header">
- header facet
- </f:facet>
-
- <f:facet name="noData">
- no data facet
- </f:facet>
-
<rich:column id="columnName">
<h:outputText id="name"
value="#{item.name}" />
</rich:column>
@@ -122,10 +114,6 @@
</h:outputText>
</rich:column>
- <f:facet name="footer">
- footer facet
- </f:facet>
-
</rich:collapsibleSubTable>
</rich:dataTable>
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/sorting-using-column.xhtml
(from rev 20922,
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/simple.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/sorting-using-column.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/sorting-using-column.xhtml 2011-01-10
08:09:52 UTC (rev 20925)
@@ -0,0 +1,139 @@
+<?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">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox id="noDataCheckbox"
value="#{richSubTableBean.state}">
+ <a4j:ajax render="richDataTable"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:dataTable id="richDataTable"
value="#{richSubTableBean.lists}" var="list">
+ <f:facet name="header">
+ <rich:columnGroup id="columnGroup">
+ <rich:column id="columnHeaderEmployees"
colspan="3">
+ <h:outputText id="columnHeaderEmployeesText"
value="Employees" />
+ </rich:column>
+ <rich:column id="columnHeaderName"
breakRowBefore="true">
+ <h:outputText id="columnHeaderNameText"
value="Name" />
+ </rich:column>
+ <rich:column id="columnHeaderTitle">
+ <h:outputText id="columnHeaderTitleText"
value="Title" />
+ </rich:column>
+ <rich:column id="columnHeaderBirthdate">
+ <h:outputText id="columnHeaderBirthdateText"
value="Birthdate" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ <rich:column id="columnSubTable" colspan="3">
+ <rich:collapsibleSubTableToggler id="subTableTC"
for="richSubTable"/>
+ <h:outputText value="#{list[0].sex == 'MALE' ?
'Men' : 'Women'}" />
+ </rich:column>
+
+ <rich:collapsibleSubTable id="richSubTable"
+
breakBefore="#{richSubTableBean.attributes['breakBefore'].value}"
+
expandMode="#{richSubTableBean.attributes['expandMode'].value}"
+
expanded="#{richSubTableBean.attributes['expanded'].value}"
+
filterVar="#{richSubTableBean.attributes['filterVar'].value}"
+
filteringListeners="#{richSubTableBean.attributes['filteringListeners'].value}"
+
first="#{richSubTableBean.attributes['first'].value}"
+
footer="#{richSubTableBean.attributes['footer'].value}"
+
header="#{richSubTableBean.attributes['header'].value}"
+
iterationState="#{richSubTableBean.attributes['iterationState'].value}"
+
iterationStatusVar="#{richSubTableBean.attributes['iterationStatusVar'].value}"
+
keepSaved="#{richSubTableBean.attributes['keepSaved'].value}"
+
noData="#{richSubTableBean.attributes['noData'].value}"
+
noDataLabel="#{richSubTableBean.attributes['noDataLabel'].value}"
+
relativeRowIndex="#{richSubTableBean.attributes['relativeRowIndex'].value}"
+
rendered="#{richSubTableBean.attributes['rendered'].value}"
+
rowAvailable="#{richSubTableBean.attributes['rowAvailable'].value}"
+
rowCount="#{richSubTableBean.attributes['rowCount'].value}"
+
rowData="#{richSubTableBean.attributes['rowData'].value}"
+
rowIndex="#{richSubTableBean.attributes['rowIndex'].value}"
+
rowKey="#{richSubTableBean.attributes['rowKey'].value}"
+
rowKeyConverter="#{richSubTableBean.attributes['rowKeyConverter'].value}"
+
rows="#{richSubTableBean.attributes['rows'].value}"
+
selection="#{richSubTableBean.attributes['selection'].value}"
+
sortExpression="#{richSubTableBean.attributes['sortExpression'].value}"
+
sortMode="#{richSubTableBean.attributes['sortMode'].value}"
+
sortPriority="#{richSubTableBean.attributes['sortPriority'].value}"
+
sortingListeners="#{richSubTableBean.attributes['sortingListeners'].value}"
+
toggleListeners="#{richSubTableBean.attributes['toggleListeners'].value}"
+ value="#{richSubTableBean.state ? list :
null}"
+ var="item">
+
+ <f:facet name="header">
+ header facet
+ </f:facet>
+
+ <f:facet name="noData">
+ no data facet
+ </f:facet>
+
+ <rich:column id="columnName">
+ <h:outputText id="name"
value="#{item.name}" />
+ </rich:column>
+ <rich:column id="columnTitle">
+ <h:outputText id="title"
value="#{item.title}" />
+ </rich:column>
+ <rich:column id="columnBirthdate">
+ <h:outputText id="birthdate"
value="#{item.birthdate}">
+ <f:convertDateTime pattern="d MMM yyyy"/>
+ </h:outputText>
+ </rich:column>
+
+ <f:facet name="footer">
+ footer facet
+ </f:facet>
+
+ </rich:collapsibleSubTable>
+ </rich:dataTable>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richSubTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/sorting-using-component-control.xhtml
(from rev 20922,
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/simple.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/sorting-using-component-control.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsibleSubTable/sorting-using-component-control.xhtml 2011-01-10
08:09:52 UTC (rev 20925)
@@ -0,0 +1,143 @@
+<?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">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox id="noDataCheckbox"
value="#{richSubTableBean.state}">
+ <a4j:ajax render="richDataTable"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:dataTable id="richDataTable"
value="#{richSubTableBean.lists}" var="list">
+ <f:facet name="header">
+ <rich:columnGroup id="columnGroup">
+ <rich:column id="columnHeaderEmployees"
colspan="3">
+ <h:outputText id="columnHeaderEmployeesText"
value="Employees" />
+ </rich:column>
+ <rich:column id="columnHeaderName"
breakRowBefore="true">
+ <h:commandLink id="sortNames"
value="Name">
+ <rich:componentControl event="click"
target="richSubTable" operation="sort">
+ <f:param value="columnName" />
+ </rich:componentControl>
+ </h:commandLink>
+ </rich:column>
+ <rich:column id="columnHeaderTitle">
+ <h:outputText id="columnHeaderTitleText"
value="Title" />
+ </rich:column>
+ <rich:column id="columnHeaderBirthdate">
+ <h:outputText id="columnHeaderBirthdateText"
value="Birthdate" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ <rich:column id="columnSubTable" colspan="3">
+ <rich:collapsibleSubTableToggler id="subTableTC"
for="richSubTable"/>
+ <h:outputText value="#{list[0].sex == 'MALE' ?
'Men' : 'Women'}" />
+ </rich:column>
+
+ <rich:collapsibleSubTable id="richSubTable"
+
breakBefore="#{richSubTableBean.attributes['breakBefore'].value}"
+
expandMode="#{richSubTableBean.attributes['expandMode'].value}"
+
expanded="#{richSubTableBean.attributes['expanded'].value}"
+
filterVar="#{richSubTableBean.attributes['filterVar'].value}"
+
filteringListeners="#{richSubTableBean.attributes['filteringListeners'].value}"
+
first="#{richSubTableBean.attributes['first'].value}"
+
footer="#{richSubTableBean.attributes['footer'].value}"
+
header="#{richSubTableBean.attributes['header'].value}"
+
iterationState="#{richSubTableBean.attributes['iterationState'].value}"
+
iterationStatusVar="#{richSubTableBean.attributes['iterationStatusVar'].value}"
+
keepSaved="#{richSubTableBean.attributes['keepSaved'].value}"
+
noData="#{richSubTableBean.attributes['noData'].value}"
+
noDataLabel="#{richSubTableBean.attributes['noDataLabel'].value}"
+
relativeRowIndex="#{richSubTableBean.attributes['relativeRowIndex'].value}"
+
rendered="#{richSubTableBean.attributes['rendered'].value}"
+
rowAvailable="#{richSubTableBean.attributes['rowAvailable'].value}"
+
rowCount="#{richSubTableBean.attributes['rowCount'].value}"
+
rowData="#{richSubTableBean.attributes['rowData'].value}"
+
rowIndex="#{richSubTableBean.attributes['rowIndex'].value}"
+
rowKey="#{richSubTableBean.attributes['rowKey'].value}"
+
rowKeyConverter="#{richSubTableBean.attributes['rowKeyConverter'].value}"
+
rows="#{richSubTableBean.attributes['rows'].value}"
+
selection="#{richSubTableBean.attributes['selection'].value}"
+
sortExpression="#{richSubTableBean.attributes['sortExpression'].value}"
+
sortMode="#{richSubTableBean.attributes['sortMode'].value}"
+
sortPriority="#{richSubTableBean.attributes['sortPriority'].value}"
+
sortingListeners="#{richSubTableBean.attributes['sortingListeners'].value}"
+
toggleListeners="#{richSubTableBean.attributes['toggleListeners'].value}"
+ value="#{richSubTableBean.state ? list :
null}"
+ var="item">
+
+ <f:facet name="header">
+ header facet
+ </f:facet>
+
+ <f:facet name="noData">
+ no data facet
+ </f:facet>
+
+ <rich:column id="columnName">
+ <h:outputText id="name"
value="#{item.name}" />
+ </rich:column>
+ <rich:column id="columnTitle">
+ <h:outputText id="title"
value="#{item.title}" />
+ </rich:column>
+ <rich:column id="columnBirthdate">
+ <h:outputText id="birthdate"
value="#{item.birthdate}">
+ <f:convertDateTime pattern="d MMM yyyy"/>
+ </h:outputText>
+ </rich:column>
+
+ <f:facet name="footer">
+ footer facet
+ </f:facet>
+
+ </rich:collapsibleSubTable>
+ </rich:dataTable>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richSubTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file