Author: ppitonak(a)redhat.com
Date: 2010-08-20 08:06:11 -0400 (Fri, 20 Aug 2010)
New Revision: 18844
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/header.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/list.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
https://jira.jboss.org/browse/RFPL-730
* added one page for rich:columnGroup
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-08-20
10:58:54 UTC (rev 18843)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-08-20
12:06:11 UTC (rev 18844)
@@ -111,6 +111,7 @@
components.put("richAccordion", "Rich Accordion");
components.put("richAccordionItem", "Rich Accordion Item");
components.put("richColumn", "Rich Column");
+ components.put("richColumnGroup", "Rich Column Group");
components.put("richComponentControl", "Rich Component
Control");
components.put("richDataGrid", "Rich Data Grid");
components.put("richDataScroller", "Rich Data Scroller");
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java 2010-08-20
12:06:11 UTC (rev 18844)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.tests.metamer.bean;
+
+import java.io.Serializable;
+import javax.annotation.PostConstruct;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+import org.richfaces.component.UIColumnGroup;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:columnGroup.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richColumnGroupBean")
+@SessionScoped
+public class RichColumnGroupBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+ private int page = 1;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(UIColumnGroup.class,
getClass());
+
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public int getPage() {
+ return page;
+ }
+
+ public void setPage(int page) {
+ this.page = page;
+ }
+}
Property changes on:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichColumnGroupBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/header.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/header.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/header.xhtml 2010-08-20
12:06:11 UTC (rev 18844)
@@ -0,0 +1,104 @@
+<!--
+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:metamer="http://java.sun.com/jsf/composite/metamer"
+
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>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:dataTable id="richDataTable" rows="10"
value="#{model.employees}" var="record">
+
+ <f:facet name="header">
+ <rich:columnGroup id="columnGroup"
+
breakBefore="#{richColumnGroupBean.attributes['breakBefore'].value}"
+
rendered="#{richColumnGroupBean.attributes['rendered'].value}">
+ <rich:column id="colHeaderName"
rowspan="2">
+ <h:outputText id="colHeaderNameText"
value="Name" />
+ </rich:column>
+ <rich:column id="colHeaderInfo"
colspan="4">
+ <h:outputText id="colHeaderInfoText"
value="Information" />
+ </rich:column>
+ <rich:column id="colHeaderTitle"
breakRowBefore="true">
+ <h:outputText id="colHeaderTitleText"
value="Title" />
+ </rich:column>
+ <rich:column id="colHeaderSmoker">
+ <h:outputText id="colHeaderSmokerText"
value="Smoker" />
+ </rich:column>
+ <rich:column id="colHeaderColor">
+ <h:outputText id="colHeaderColorText"
value="Favorite Color" />
+ </rich:column>
+ <rich:column id="colHeaderNumberOfKids">
+ <h:outputText id="colHeaderNumberOfKidsText"
value="Number of Kids" />
+ </rich:column>
+ </rich:columnGroup>
+ </f:facet>
+
+ <rich:column id="columnName">
+ <h:outputText value="#{record.name}" />
+ </rich:column>
+
+ <rich:column id="columnTitle">
+ <h:outputText value="#{record.title}" />
+ </rich:column>
+
+ <rich:column id="columnSmoker">
+ <h:selectBooleanCheckbox value="#{record.smoker}">
+
+ </h:selectBooleanCheckbox>
+ </rich:column>
+
+ <rich:column id="columnFavoriteColor">
+ <h:outputText value="#{record.favoriteColor}" />
+ </rich:column>
+
+ <rich:column id="columnNumberOfKids">
+ <h:outputText value="#{record.numberOfKids}" />
+ </rich:column>
+
+ <f:facet name="footer">
+ <rich:dataScroller id="scroller2"
for="richDataTable" page="#{richColumnGroupBean.page}"
maxPages="7" render="richDataTable" />
+ </f:facet>
+
+ </rich:dataTable>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richColumnGroupBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/list.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richColumnGroup/list.xhtml 2010-08-20
12:06:11 UTC (rev 18844)
@@ -0,0 +1,41 @@
+<!--
+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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <ui:composition template="/templates/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Column Group</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="header" outcome="header"
value="Header">
+ Simple page that contains a table using
<b>rich:columnGroup</b> and input boxes for all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>