Author: lfryc(a)redhat.com
Date: 2010-07-10 15:12:18 -0400 (Sat, 10 Jul 2010)
New Revision: 17836
Added:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichDataScrollerBean.java
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichExtendedDataTableBean.java
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/RichDataScrollerBean.properties
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/RichExtendedDataTableBean.properties
root/tests/metamer/trunk/src/main/webapp/components/richDataScroller/
root/tests/metamer/trunk/src/main/webapp/components/richDataScroller/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/richDataScroller/simple.xhtml
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/components1.xhtml
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/components2.xhtml
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/list.xhtml
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/scroller.xhtml
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/simple.xhtml
root/tests/metamer/trunk/src/main/webapp/resources/css/richDataScroller.css
root/tests/metamer/trunk/src/main/webapp/resources/css/richExtendedDataTable.css
Modified:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java
Log:
https://jira.jboss.org/browse/RFPL-466
* added extended data table
* added data scroller
Modified: root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java 2010-07-10
19:10:47 UTC (rev 17835)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichBean.java 2010-07-10
19:12:18 UTC (rev 17836)
@@ -99,7 +99,9 @@
components.put("a4jPoll", "A4J Poll");
components.put("a4jPush", "A4J Push");
components.put("commandButton", "JSF Command Button");
+ components.put("richDataScroller", "Rich Data Scroller");
components.put("richDataTable", "Rich Data Table");
+ components.put("richExtendedDataTable", "Rich Extended Data
Table");
}
private List<String> createSkinList() {
Added:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichDataScrollerBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichDataScrollerBean.java
(rev 0)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichDataScrollerBean.java 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+
+package org.richfaces.testapp.bean;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.component.UIDataScroller;
+import org.richfaces.testapp.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:dataScroller.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richDataScrollerBean")
+@SessionScoped
+public class RichDataScrollerBean implements Serializable {
+
+ private static final long serialVersionUID = 122475400649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private int page = 1;
+ private boolean state = true;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(UIDataScroller.class,
getClass());
+
+ attributes.put("boundaryControls", "show");
+ attributes.put("fastControls", "show");
+ attributes.put("fastStep", 1);
+ attributes.put("lastPageMode", "short");
+ attributes.put("maxPages", 10);
+ attributes.put("rendered", true);
+ attributes.put("render", "richDataTable");
+
+ // FIXME doesn't work: could not find dataTable for datascroller scroller1
+ attributes.remove("for");
+
+ // will be tested in another way
+ attributes.remove("page");
+
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for page.
+ * @return number of the page to which table is scrolled
+ */
+ public int getPage() {
+ return page;
+ }
+
+ /**
+ * Setter for page.
+ * @param page number of the page to which table is scrolled
+ */
+ public void setPage(int page) {
+ this.page = page;
+ }
+
+ /**
+ * Getter for state.
+ * @return true if non-empty data model should be used in table
+ */
+ public boolean isState() {
+ return state;
+ }
+
+ /**
+ * Setter for state.
+ * @param state true if non-empty data model should be used in table
+ */
+ public void setState(boolean state) {
+ this.state = state;
+ }
+
+}
Added:
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichExtendedDataTableBean.java
===================================================================
---
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichExtendedDataTableBean.java
(rev 0)
+++
root/tests/metamer/trunk/src/main/java/org/richfaces/testapp/bean/RichExtendedDataTableBean.java 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * 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.
+ *******************************************************************************/
+
+package org.richfaces.testapp.bean;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.PostConstruct;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import org.ajax4jsf.model.DataComponentState;
+import org.richfaces.component.UIExtendedDataTable;
+import org.richfaces.event.SortingEvent;
+import org.richfaces.testapp.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:extendedDataTable.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richExtendedDataTableBean")
+@SessionScoped
+public class RichExtendedDataTableBean implements Serializable {
+
+ private static final long serialVersionUID = 481478880649809L;
+ private static Logger logger;
+ private Attributes attributes;
+ private DataComponentState dataTableState;
+ private Map<Object, Integer> stateMap = new HashMap<Object, Integer>();
+ private int page = 1;
+ private boolean state = true;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(UIExtendedDataTable.class,
getClass());
+ attributes.put("rendered", true);
+ attributes.put("rows", 30);
+ attributes.put("styleClass", "extended-data-table");
+ attributes.put("style", null);
+
+ // TODO these must be tested in other way
+ attributes.remove("componentState");
+ attributes.remove("rowKeyVar");
+ attributes.remove("stateVar");
+ attributes.remove("value");
+ attributes.remove("var");
+
+ // TODO can be these set as attributes or only as facets?
+ attributes.remove("caption");
+ attributes.remove("header");
+ attributes.remove("footer");
+ attributes.remove("noData");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * Getter for page.
+ *
+ * @return page number that will be used by data scroller
+ */
+ public int getPage() {
+ return page;
+ }
+
+ /**
+ * Setter for page.
+ * @param page page number that will be used by data scroller
+ */
+ public void setPage(int page) {
+ this.page = page;
+ }
+
+ public Map<Object, Integer> getStateMap() {
+ return stateMap;
+ }
+
+ public void setStateMap(Map<Object, Integer> stateMap) {
+ this.stateMap = stateMap;
+ }
+
+ public DataComponentState getDataTableState() {
+ return dataTableState;
+ }
+
+ public void setDataTableState(DataComponentState dataTableState) {
+ this.dataTableState = dataTableState;
+ }
+
+ /**
+ * Getter for state.
+ * @return true if data should be displayed in table
+ */
+ public boolean isState() {
+ return state;
+ }
+
+ /**
+ * Setter for state.
+ * @param state true if data should be displayed in table
+ */
+ public void setState(boolean state) {
+ this.state = state;
+ }
+
+ public void sortingListener(SortingEvent event) {
+ System.out.println(event.getSortOrder());
+ }
+
+}
Added:
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/RichDataScrollerBean.properties
===================================================================
---
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/RichDataScrollerBean.properties
(rev 0)
+++
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/RichDataScrollerBean.properties 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,10 @@
+attr.boundaryControls.show=show
+attr.boundaryControls.auto=auto
+attr.boundaryControls.hide=hide
+
+attr.fastControls.show=show
+attr.fastControls.hide=hide
+attr.fastControls.auto=auto
+
+attr.lastPageMode.full=full
+attr.lastPageMode.short=short
\ No newline at end of file
Added:
root/tests/metamer/trunk/src/main/resources/org/richfaces/testapp/bean/RichExtendedDataTableBean.properties
===================================================================
Added: root/tests/metamer/trunk/src/main/webapp/components/richDataScroller/list.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/richDataScroller/list.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/richDataScroller/list.xhtml 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,39 @@
+<!--
+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.
+-->
+
+<!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:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
+ <h:head>
+ <title>Rich Data Table</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="list.css" />
+ </h:head>
+
+ <h:body>
+
+ <h:outputLink value="simple.xhtml"
styleClass="link">Simple</h:outputLink>
+ <div class="description">Simple page that contains
<b>rich:dataTable</b> with two <b>rich:dataScroller</b>s and input
boxes for all their attributes.</div>
+
+ </h:body>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/components/richDataScroller/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/richDataScroller/simple.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/richDataScroller/simple.xhtml 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,228 @@
+<!--
+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.
+-->
+
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp"
xmlns:it="http://richfaces.org/iteration"
+
xmlns:cc="http://richfaces.org/componentControl"
xmlns:rich="http://richfaces.org/rich">
+
+ <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>
+ <h:outputStylesheet library="css"
name="richDataScroller.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox
value="#{richDataScrollerBean.state}">
+ <a4j:ajax render="richDataTable scroller1"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ <it:dataScroller id="scroller1"
+
boundaryControls="#{richDataScrollerBean.attributes['boundaryControls']}"
+
dataTable="#{richDataScrollerBean.attributes['dataTable']}"
+
fastControls="#{richDataScrollerBean.attributes['fastControls']}"
+
fastForward="#{richDataScrollerBean.attributes['fastForward']}"
+
fastRewind="#{richDataScrollerBean.attributes['fastRewind']}"
+
fastStep="#{richDataScrollerBean.attributes['fastStep']}"
+
first="#{richDataScrollerBean.attributes['first']}"
+ for="richDataTable"
+
iterationState="#{richDataScrollerBean.attributes['iterationState']}"
+
last="#{richDataScrollerBean.attributes['last']}"
+
lastPageMode="#{richDataScrollerBean.attributes['lastPageMode']}"
+
localPageSet="#{richDataScrollerBean.attributes['localPageSet']}"
+
maxPages="#{richDataScrollerBean.attributes['maxPages']}"
+ page="#{richDataScrollerBean.page}"
+
pageCount="#{richDataScrollerBean.attributes['pageCount']}"
+
rendered="#{richDataScrollerBean.attributes['rendered']}"
+
render="#{richDataScrollerBean.attributes['render']}"
+
rowCount="#{richDataScrollerBean.attributes['rowCount']}"
+
scrollerListeners="#{richDataScrollerBean.attributes['scrollerListeners']}"
+ />
+ </ui:define>
+
+ <ui:define name="component">
+
+ <it:dataTable id="richDataTable"
+ rows="9"
+ value="#{richDataScrollerBean.state ? model.capitals :
null}"
+ var="record"
+ >
+
+ <f:facet name="noData">
+ <h:outputText value="There is no data."
style="color: red;"/>
+ </f:facet>
+
+ <it:column id="columnState"
sortBy="#{record.state}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderState"
value="State" />
+ </f:facet>
+
+ <h:outputText value="#{record.state}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterState"
value="State" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnCapital"
sortBy="#{record.name}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderCapital"
value="Capital" />
+ </f:facet>
+
+ <h:outputText value="#{record.name}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterCapital"
value="Capital" />
+ </f:facet>
+ </it:column>
+
+ <f:facet name="footer">
+ <it:dataScroller id="scroller2"
+
boundaryControls="#{richDataScrollerBean.attributes['boundaryControls']}"
+
dataTable="#{richDataScrollerBean.attributes['dataTable']}"
+
fastControls="#{richDataScrollerBean.attributes['fastControls']}"
+
fastForward="#{richDataScrollerBean.attributes['fastForward']}"
+
fastRewind="#{richDataScrollerBean.attributes['fastRewind']}"
+
fastStep="#{richDataScrollerBean.attributes['fastStep']}"
+
first="#{richDataScrollerBean.attributes['first']}"
+ for="richDataTable"
+
iterationState="#{richDataScrollerBean.attributes['iterationState']}"
+
last="#{richDataScrollerBean.attributes['last']}"
+
lastPageMode="#{richDataScrollerBean.attributes['lastPageMode']}"
+
localPageSet="#{richDataScrollerBean.attributes['localPageSet']}"
+
maxPages="#{richDataScrollerBean.attributes['maxPages']}"
+ page="#{richDataScrollerBean.page}"
+
pageCount="#{richDataScrollerBean.attributes['pageCount']}"
+
rendered="#{richDataScrollerBean.attributes['rendered']}"
+
render="#{richDataScrollerBean.attributes['render']}"
+
rowCount="#{richDataScrollerBean.attributes['rowCount']}"
+
scrollerListeners="#{richDataScrollerBean.attributes['scrollerListeners']}"
+ />
+ </f:facet>
+
+ </it:dataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <fieldset><legend>JavaScript API - scroller1</legend>
+ <h:commandButton value="«« first">
+ <cc:componentControl event="click"
target="scroller1" operation="switchToPage">
+ <f:param value="first" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="« previous">
+ <cc:componentControl event="click"
target="scroller1" operation="switchToPage">
+ <f:param value="fastrewind" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="next »">
+ <cc:componentControl event="click"
target="scroller1" operation="switchToPage">
+ <f:param value="fastforward" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="last »»">
+ <cc:componentControl event="click"
target="scroller1" operation="switchToPage">
+ <f:param value="last" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <br/>
+
+ <h:commandButton value="«« first">
+ <cc:componentControl event="click"
target="scroller1" operation="first" />
+ </h:commandButton>
+
+ <h:commandButton value="« previous">
+ <cc:componentControl event="click"
target="scroller1" operation="previous" />
+ </h:commandButton>
+
+ <h:commandButton value="next »">
+ <cc:componentControl event="click"
target="scroller1" operation="next" />
+ </h:commandButton>
+
+ <h:commandButton value="last »»">
+ <cc:componentControl event="click"
target="scroller1" operation="last" />
+ </h:commandButton>
+ </fieldset>
+
+ <br/>
+
+ <fieldset><legend>JavaScript API - scroller2</legend>
+ <h:commandButton value="«« first">
+ <cc:componentControl event="click"
target="scroller2" operation="switchToPage">
+ <f:param value="first" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="« previous">
+ <cc:componentControl event="click"
target="scroller2" operation="switchToPage">
+ <f:param value="fastrewind" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="next »">
+ <cc:componentControl event="click"
target="scroller2" operation="switchToPage">
+ <f:param value="fastforward" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="last »»">
+ <cc:componentControl event="click"
target="scroller2" operation="switchToPage">
+ <f:param value="last" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <br/>
+
+ <h:commandButton value="«« first">
+ <cc:componentControl event="click"
target="scroller2" operation="first" />
+ </h:commandButton>
+
+ <h:commandButton value="« previous">
+ <cc:componentControl event="click"
target="scroller2" operation="previous" />
+ </h:commandButton>
+
+ <h:commandButton value="next »">
+ <cc:componentControl event="click"
target="scroller2" operation="next" />
+ </h:commandButton>
+
+ <h:commandButton value="last »»">
+ <cc:componentControl event="click"
target="scroller2" operation="last" />
+ </h:commandButton>
+ </fieldset>
+
+ <br/><br/>
+
+ <ta:attributes value="#{richDataScrollerBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/components1.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/components1.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/components1.xhtml 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,180 @@
+<!--
+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.
+-->
+
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp"
xmlns:it="http://richfaces.org/iteration"
+
xmlns:cc="http://richfaces.org/componentControl"
xmlns:rich="http://richfaces.org/rich">
+
+ <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>
+ <h:outputStylesheet library="css"
name="richExtendedDataTable.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox
value="#{richExtendedDataTableBean.state}">
+ <a4j:ajax render="richEDT scroller1"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ <it:dataScroller id="scroller1" for="richEDT"
page="#{richExtendedDataTableBean.page}" maxPages="7"
render="richEDT"/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <it:dataTable id="richEDT"
+
filterVar="#{richExtendedDataTableBean.attributes['filterVar']}"
+
filteringListeners="#{richExtendedDataTableBean.attributes['filteringListeners']}"
+
first="#{richExtendedDataTableBean.attributes['first']}"
+
iterationState="#{richExtendedDataTableBean.attributes['iterationState']}"
+
iterationStatusVar="#{richExtendedDataTableBean.attributes['iterationStatusVar']}"
+
keepSaved="#{richExtendedDataTableBean.attributes['keepSaved']}"
+
noDataLabel="#{richExtendedDataTableBean.attributes['noDataLabel']}"
+
relativeRowIndex="#{richExtendedDataTableBean.attributes['relativeRowIndex']}"
+
rendered="#{richExtendedDataTableBean.attributes['rendered']}"
+
rowAvailable="#{richExtendedDataTableBean.attributes['rowAvailable']}"
+
rowCount="#{richExtendedDataTableBean.attributes['rowCount']}"
+
rowData="#{richExtendedDataTableBean.attributes['rowData']}"
+
rowIndex="#{richExtendedDataTableBean.attributes['rowIndex']}"
+
rowKey="#{richExtendedDataTableBean.attributes['rowKey']}"
+
rowKeyConverter="#{richExtendedDataTableBean.attributes['rowKeyConverter']}"
+
rows="#{richExtendedDataTableBean.attributes['rows']}"
+
sortMode="#{richExtendedDataTableBean.attributes['sortMode']}"
+
sortPriority="#{richExtendedDataTableBean.attributes['sortPriority']}"
+
sortingListeners="#{richExtendedDataTableBean.attributes['sortingListeners']}"
+ value="#{richExtendedDataTableBean.state ? model.employees
: null}"
+ var="record"
+ >
+
+ <f:facet name="noData">
+ <h:outputText value="There is no data."
style="color: red;"/>
+ </f:facet>
+
+ <f:facet name="caption">
+ <h:outputText id="captionFacet" value="Caption
Facet" />
+ </f:facet>
+
+ <f:facet name="header">
+ <h:outputText value="Header Facet" />
+ </f:facet>
+
+ <it:column id="columnSex"
sortBy="#{record.sex}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderSex"
value="Sex" />
+ <br/>
+ <h:outputText id="columnHeaderSexComponent"
value="h:graphicImage" />
+ </f:facet>
+
+ <h:graphicImage library="images" name="#{record.sex
== 'MALE' ? 'male.png' : 'female.png'}" />
+
+ <f:facet name="footer">
+ <h:outputText id="columnFooterSex"
value="Sex" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnName"
sortBy="#{record.name}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderName"
value="Name" />
+ <br/>
+ <h:outputText id="columnHeaderNameComponent"
value="h:outputText" />
+ </f:facet>
+
+ <h:outputText value="#{record.name}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterState"
value="Name" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnTitle"
sortBy="#{record.title}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderTitle"
value="Title" />
+ <br/>
+ <h:outputText id="columnHeaderTitleComponent"
value="rich:inplaceSelect" />
+ </f:facet>
+
+ <h:outputText value="#{record.title}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterTitle"
value="Title" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnSmoker"
sortBy="#{record.smoker}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderSmoker"
value="Smoker" />
+ <br/>
+ <h:outputText id="columnHeaderSmokerComponent"
value="h:selectBooleanCheckbox" />
+ </f:facet>
+
+ <h:selectBooleanCheckbox value="#{record.smoker}"/>
+
+ <f:facet name="footer">
+ <h:outputText id="columnFooterSmoker"
value="Smoker" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnFavoriteColor"
sortBy="#{record.favoriteColor}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderFavoriteColor"
value="Favorite Color" />
+ <br/>
+ <h:outputText
id="columnHeaderFavoriteColorComponent" value="rich:colorPicker"
/>
+ </f:facet>
+
+ <h:outputText value="#{record.favoriteColor}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterFavoriteColor"
value="Favorite Color" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnNumberOfKids"
sortBy="#{record.numberOfKids}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderNumberOfKids"
value="Number of Kids" />
+ <br/>
+ <h:outputText id="columnHeaderNumberOfKidsComponent"
value="rich:inputNumberSpinner" />
+ </f:facet>
+
+ <h:outputText value="#{record.numberOfKids}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterNumberOfKids"
value="Number of Kids" />
+ </f:facet>
+ </it:column>
+
+ <f:facet name="footer">
+ <it:dataScroller id="scroller2" for="richEDT"
page="#{richExtendedDataTableBean.page}" maxPages="7"
render="richEDT" />
+ </f:facet>
+
+ </it:dataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ta:attributes value="#{richExtendedDataTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/components2.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/components2.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/components2.xhtml 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,184 @@
+<!--
+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.
+-->
+
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp"
xmlns:it="http://richfaces.org/iteration"
+
xmlns:cc="http://richfaces.org/componentControl"
xmlns:rich="http://richfaces.org/rich">
+
+ <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>
+ <h:outputStylesheet library="css"
name="richDataTable.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox
value="#{richExtendedDataTableBean.state}">
+ <a4j:ajax render="richEDT scroller1"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ <it:dataScroller id="scroller1" for="richEDT"
page="#{richExtendedDataTableBean.page}" maxPages="7"
render="richEDT"/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <it:dataTable id="richEDT"
+
filterVar="#{richExtendedDataTableBean.attributes['filterVar']}"
+
filteringListeners="#{richExtendedDataTableBean.attributes['filteringListeners']}"
+
first="#{richExtendedDataTableBean.attributes['first']}"
+
iterationState="#{richExtendedDataTableBean.attributes['iterationState']}"
+
iterationStatusVar="#{richExtendedDataTableBean.attributes['iterationStatusVar']}"
+
keepSaved="#{richExtendedDataTableBean.attributes['keepSaved']}"
+
noDataLabel="#{richExtendedDataTableBean.attributes['noDataLabel']}"
+
relativeRowIndex="#{richExtendedDataTableBean.attributes['relativeRowIndex']}"
+
rendered="#{richExtendedDataTableBean.attributes['rendered']}"
+
rowAvailable="#{richExtendedDataTableBean.attributes['rowAvailable']}"
+
rowCount="#{richExtendedDataTableBean.attributes['rowCount']}"
+
rowData="#{richExtendedDataTableBean.attributes['rowData']}"
+
rowIndex="#{richExtendedDataTableBean.attributes['rowIndex']}"
+
rowKey="#{richExtendedDataTableBean.attributes['rowKey']}"
+
rowKeyConverter="#{richExtendedDataTableBean.attributes['rowKeyConverter']}"
+
rows="#{richExtendedDataTableBean.attributes['rows']}"
+
sortMode="#{richExtendedDataTableBean.attributes['sortMode']}"
+
sortPriority="#{richExtendedDataTableBean.attributes['sortPriority']}"
+
sortingListeners="#{richExtendedDataTableBean.attributes['sortingListeners']}"
+ value="#{richExtendedDataTableBean.state ? model.employees
: null}"
+ var="record"
+ >
+
+ <f:facet name="noData">
+ <h:outputText value="There is no data."
style="color: red;"/>
+ </f:facet>
+
+ <f:facet name="caption">
+ <h:outputText id="captionFacet" value="Caption
Facet" />
+ </f:facet>
+
+ <f:facet name="header">
+ <h:outputText value="Header Facet" />
+ </f:facet>
+
+ <it:column id="columnSex"
sortBy="#{record.sex}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderSex"
value="Sex" />
+ <br/>
+ <h:outputText id="columnHeaderSexComponent"
value="rich:paint2D" />
+ </f:facet>
+
+ <h:outputText value="#{record.sex}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterSex"
value="Sex" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnName"
sortBy="#{record.name}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderName"
value="Name" />
+ <br/>
+ <h:outputText id="columnHeaderNameComponent"
value="h:inplaceInput" />
+ </f:facet>
+
+ <h:outputText value="#{record.name}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterState"
value="Name" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnTitle"
sortBy="#{record.title}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderTitle"
value="Title" />
+ <br/>
+ <h:outputText id="columnHeaderTitleComponent"
value="rich:comboBox" />
+ </f:facet>
+
+ <h:outputText value="#{record.title}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterTitle"
value="Title" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnBirthdate"
sortBy="#{record.birthdate}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderBirthdate"
value="Birthdate" />
+ <br/>
+ <h:outputText id="columnHeaderBirthdateComponent"
value="rich:calendar" />
+ </f:facet>
+
+ <h:outputText value="#{record.birthdate}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterBirthdate"
value="Birthdate" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnCompanies"
sortBy="#{record.companies}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderCompanies"
value="Companies" />
+ <br/>
+ <h:outputText id="columnHeaderCompaniesComponent"
value="a4j:repeat" />
+ </f:facet>
+
+ <ul>
+ <a4j:repeat value="#{record.companies}"
var="company">
+ <li>#{company.name}</li>
+ </a4j:repeat>
+
+ </ul>
+
+ <f:facet name="footer">
+ <h:outputText id="columnFooterSmoker"
value="Smoker" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnNumberOfKids"
sortBy="#{record.numberOfKids}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderNumberOfKids"
value="Number of Kids" />
+ <br/>
+ <h:outputText id="columnHeaderNumberOfKidsComponent"
value="rich:inputNumberSlider" />
+ </f:facet>
+
+ <h:outputText value="#{record.numberOfKids}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterNumberOfKids"
value="Number of Kids" />
+ </f:facet>
+ </it:column>
+
+ <f:facet name="footer">
+ <it:dataScroller id="scroller2" for="richEDT"
page="#{richExtendedDataTableBean.page}" maxPages="7"
render="richEDT" />
+ </f:facet>
+
+ </it:dataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <ta:attributes value="#{richExtendedDataTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/list.xhtml
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/list.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/list.xhtml 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,50 @@
+<!--
+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.
+-->
+
+<!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:a4j="http://richfaces.org/a4j"
xmlns:c="http://java.sun.com/jsp/jstl/core">
+
+ <h:head>
+ <title>Rich Data Table</title>
+ <meta http-equiv="Content-Type" content="text/xhtml;
charset=UTF-8" />
+ <h:outputStylesheet library="css" name="list.css" />
+ </h:head>
+
+ <h:body>
+
+ <h:outputLink value="simple.xhtml"
styleClass="link">Simple</h:outputLink>
+ <div class="description">Simple page that contains
<b>rich:dataTable</b> (with model containing capitals) and input boxes for all
its attributes.</div>
+
+ <h:outputLink value="scroller.xhtml"
styleClass="link">Data Scroller</h:outputLink>
+ <div class="description">Page that contains
<b>rich:dataTable</b> (with model containing capitals), data scroller and
input boxes for all its attributes.</div>
+
+ <h:outputLink value="components1.xhtml"
styleClass="link">Various Components 1</h:outputLink>
+ <div class="description">Page that contains
<b>rich:dataTable</b> (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></div>
+
+ <h:outputLink value="components2.xhtml"
styleClass="link">Various Components 2</h:outputLink>
+ <div class="description">Page that contains
<b>rich:dataTable</b> (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></div>
+
+ </h:body>
+</html>
\ No newline at end of file
Added:
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/scroller.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/scroller.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/scroller.xhtml 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,180 @@
+<!--
+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.
+-->
+
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp"
xmlns:it="http://richfaces.org/iteration"
+
xmlns:cc="http://richfaces.org/componentControl"
xmlns:rich="http://richfaces.org/rich">
+
+ <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>
+ <h:outputStylesheet library="css"
name="richExtendedDataTable.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox
value="#{richExtendedDataTableBean.state}">
+ <a4j:ajax render="richEDT scroller1"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ <it:dataScroller id="scroller1" for="richEDT"
page="#{richExtendedDataTableBean.page}" maxPages="7"
render="richEDT"/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <it:dataTable id="richEDT"
+
filterVar="#{richExtendedDataTableBean.attributes['filterVar']}"
+
filteringListeners="#{richExtendedDataTableBean.attributes['filteringListeners']}"
+
first="#{richExtendedDataTableBean.attributes['first']}"
+
iterationState="#{richExtendedDataTableBean.attributes['iterationState']}"
+
iterationStatusVar="#{richExtendedDataTableBean.attributes['iterationStatusVar']}"
+
keepSaved="#{richExtendedDataTableBean.attributes['keepSaved']}"
+
noDataLabel="#{richExtendedDataTableBean.attributes['noDataLabel']}"
+
relativeRowIndex="#{richExtendedDataTableBean.attributes['relativeRowIndex']}"
+
rendered="#{richExtendedDataTableBean.attributes['rendered']}"
+
rowAvailable="#{richExtendedDataTableBean.attributes['rowAvailable']}"
+
rowCount="#{richExtendedDataTableBean.attributes['rowCount']}"
+
rowData="#{richExtendedDataTableBean.attributes['rowData']}"
+
rowIndex="#{richExtendedDataTableBean.attributes['rowIndex']}"
+
rowKey="#{richExtendedDataTableBean.attributes['rowKey']}"
+
rowKeyConverter="#{richExtendedDataTableBean.attributes['rowKeyConverter']}"
+
rows="#{richExtendedDataTableBean.attributes['rows']}"
+
sortMode="#{richExtendedDataTableBean.attributes['sortMode']}"
+
sortPriority="#{richExtendedDataTableBean.attributes['sortPriority']}"
+
sortingListeners="#{richExtendedDataTableBean.attributes['sortingListeners']}"
+ value="#{richExtendedDataTableBean.state ? model.capitals
: null}"
+ var="record"
+ >
+
+ <f:facet name="noData">
+ <h:outputText value="There is no data."
style="color: red;"/>
+ </f:facet>
+
+ <f:facet name="caption">
+ <h:outputText id="captionFacet" value="Caption
Facet" />
+ </f:facet>
+
+ <f:facet name="header">
+ <h:outputText value="Header Facet" />
+ </f:facet>
+
+ <it:column id="columnState"
sortBy="#{record.state}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderState"
value="State" />
+ </f:facet>
+
+ <h:outputText value="#{record.state}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterState"
value="State" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnCapital"
sortBy="#{record.name}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderCapital"
value="Capital" />
+ </f:facet>
+
+ <h:outputText value="#{record.name}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterCapital"
value="Capital" />
+ </f:facet>
+ </it:column>
+
+ <f:facet name="footer">
+ <it:dataScroller id="scroller2" for="richEDT"
page="#{richExtendedDataTableBean.page}" maxPages="7"
render="richEDT" />
+ </f:facet>
+
+ </it:dataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <h:commandButton value="sort state">
+ <cc:componentControl event="click"
target="richEDT" operation="sort"/>
+ </h:commandButton>
+
+ <h:commandButton value="sort capital">
+ <cc:componentControl event="click"
target="richEDT" operation="sort">
+ <f:param value="columnCapital" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <br/>
+
+ scroller1:
+ <h:commandButton value="<< first">
+ <cc:componentControl event="click"
target="#{rich:clientId('scroller1')}"
operation="switchToPage">
+ <f:param value="first" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="< previous">
+ <cc:componentControl event="click"
target="#{rich:clientId('scroller1')}" operation="previous"
/>
+ </h:commandButton>
+
+ <h:commandButton value="next >">
+ <cc:componentControl event="click"
target="#{rich:clientId('scroller1')}" operation="next" />
+ </h:commandButton>
+
+ <h:commandButton value="last >>">
+ <cc:componentControl event="click"
target="#{rich:clientId('scroller1')}"
operation="switchToPage">
+ <f:param value="last" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <br/>
+
+ scroller2:
+ <h:commandButton value="<< first">
+ <cc:componentControl event="click"
target="#{rich:clientId('scroller2')}"
operation="switchToPage">
+ <f:param value="first" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="< previous">
+ <cc:componentControl event="click"
target="#{rich:clientId('scroller2')}" operation="previous"
/>
+ </h:commandButton>
+
+ <h:commandButton value="next >">
+ <cc:componentControl event="click"
target="#{rich:clientId('scroller2')}" operation="next" />
+ </h:commandButton>
+
+ <h:commandButton value="last >>">
+ <cc:componentControl event="click"
target="#{rich:clientId('scroller2')}"
operation="switchToPage">
+ <f:param value="last" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <br/><br/>
+
+ <ta:attributes value="#{richExtendedDataTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/simple.xhtml
===================================================================
---
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/simple.xhtml
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/components/richExtendedDataTable/simple.xhtml 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,135 @@
+<!--
+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.
+-->
+
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:ta="http://java.sun.com/jsf/composite/testapp"
xmlns:it="http://richfaces.org/iteration"
+
xmlns:cc="http://richfaces.org/componentControl"
xmlns:rich="http://richfaces.org/rich">
+
+ <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>
+ <h:outputStylesheet library="css"
name="richExtendedDataTable.css"/>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ <br/>
+ <h:outputText value="Show data in table: " />
+ <h:selectBooleanCheckbox
value="#{richExtendedDataTableBean.state}">
+ <a4j:ajax render="richEDT scroller1"/>
+ </h:selectBooleanCheckbox>
+ <br/><br/>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <it:extendedDataTable id="richEDT"
+
clientFirst="#{richExtendedDataTableBean.attributes['clientFirst']}"
+
clientRows="#{richExtendedDataTableBean.attributes['clientRows']}"
+
filterVar="#{richExtendedDataTableBean.attributes['filterVar']}"
+
filteringListeners="#{richExtendedDataTableBean.attributes['filteringListeners']}"
+
first="#{richExtendedDataTableBean.attributes['first']}"
+
iterationState="#{richExtendedDataTableBean.attributes['iterationState']}"
+
iterationStatusVar="#{richExtendedDataTableBean.attributes['iterationStatusVar']}"
+
keepSaved="#{richExtendedDataTableBean.attributes['keepSaved']}"
+
noDataLabel="#{richExtendedDataTableBean.attributes['noDataLabel']}"
+
relativeRowIndex="#{richExtendedDataTableBean.attributes['relativeRowIndex']}"
+
rendered="#{richExtendedDataTableBean.attributes['rendered']}"
+
rowAvailable="#{richExtendedDataTableBean.attributes['rowAvailable']}"
+
rowCount="#{richExtendedDataTableBean.attributes['rowCount']}"
+
rowData="#{richExtendedDataTableBean.attributes['rowData']}"
+
rowIndex="#{richExtendedDataTableBean.attributes['rowIndex']}"
+
rowKey="#{richExtendedDataTableBean.attributes['rowKey']}"
+
rowKeyConverter="#{richExtendedDataTableBean.attributes['rowKeyConverter']}"
+
rows="#{richExtendedDataTableBean.attributes['rows']}"
+
sortMode="#{richExtendedDataTableBean.attributes['sortMode']}"
+
sortPriority="#{richExtendedDataTableBean.attributes['sortPriority']}"
+
sortingListeners="#{richExtendedDataTableBean.attributes['sortingListeners']}"
+
style="#{richExtendedDataTableBean.attributes['style']}"
+
styleClass="#{richExtendedDataTableBean.attributes['styleClass']}"
+ value="#{richExtendedDataTableBean.state ?
model.capitals : null}"
+ var="record"
+
+
+ >
+
+ <f:facet name="noData">
+ <h:outputText value="There is no data."
style="color: red;"/>
+ </f:facet>
+
+ <f:facet name="caption">
+ <h:outputText id="captionFacet" value="Caption
Facet" />
+ </f:facet>
+
+ <f:facet name="header">
+ <h:outputText value="Header Facet" />
+ </f:facet>
+
+ <it:column id="columnState"
sortBy="#{record.state}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderState"
value="State Header" />
+ </f:facet>
+
+ <h:outputText value="#{record.state}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterState"
value="State Footer" />
+ </f:facet>
+ </it:column>
+
+ <it:column id="columnCapital"
sortBy="#{record.name}">
+ <f:facet name="header">
+ <h:outputText id="columnHeaderCapital"
value="Capital Header" />
+ </f:facet>
+
+ <h:outputText value="#{record.name}" />
+ <f:facet name="footer">
+ <h:outputText id="columnFooterCapital"
value="Capital Footer" />
+ </f:facet>
+ </it:column>
+
+ </it:extendedDataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <h:commandButton value="sort states">
+ <cc:componentControl event="click"
target="richEDT" operation="sort"/>
+ </h:commandButton>
+
+ <h:commandButton value="sort capitals">
+ <cc:componentControl event="click"
target="richEDT" operation="sort">
+ <f:param value="columnCapital" />
+ </cc:componentControl>
+ </h:commandButton>
+
+ <br/><br/>
+
+ <ta:attributes value="#{richExtendedDataTableBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added: root/tests/metamer/trunk/src/main/webapp/resources/css/richDataScroller.css
===================================================================
Added: root/tests/metamer/trunk/src/main/webapp/resources/css/richExtendedDataTable.css
===================================================================
--- root/tests/metamer/trunk/src/main/webapp/resources/css/richExtendedDataTable.css
(rev 0)
+++
root/tests/metamer/trunk/src/main/webapp/resources/css/richExtendedDataTable.css 2010-07-10
19:12:18 UTC (rev 17836)
@@ -0,0 +1,16 @@
+.align-center {
+ text-align: center;
+}
+
+.align-left {
+ text-align: left;
+}
+
+.align-right {
+ text-align: right;
+}
+
+.extended-data-table {
+ width: 300;
+ height: 400px;
+}
\ No newline at end of file