Author: ppitonak(a)redhat.com
Date: 2010-09-15 09:20:36 -0400 (Wed, 15 Sep 2010)
New Revision: 19216
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/facets.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
https://jira.jboss.org/browse/RF-9261
* two pages for rich:collapsiblePanel added
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-09-15
13:07:19 UTC (rev 19215)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-09-15
13:20:36 UTC (rev 19216)
@@ -111,6 +111,7 @@
components.put("richAccordion", "Rich Accordion");
components.put("richAccordionItem", "Rich Accordion Item");
components.put("richAutocomplete", "Rich Autocomplete");
+ components.put("richCollapsiblePanel", "Rich Collapsible
Panel");
components.put("richColumn", "Rich Column");
components.put("richColumnGroup", "Rich Column Group");
components.put("richComponentControl", "Rich Component
Control");
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.java 2010-09-15
13:20:36 UTC (rev 19216)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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.ViewScoped;
+import org.richfaces.component.UICollapsiblePanel;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:collapsiblePanel.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richCollapsiblePanelBean")
+@ViewScoped
+public class RichCollapsiblePanelBean implements Serializable {
+
+ private static final long serialVersionUID = -1L;
+ private static Logger logger;
+ private Attributes attributes;
+
+ /**
+ * Initializes the managed bean.
+ */
+ @PostConstruct
+ public void init() {
+ logger = LoggerFactory.getLogger(getClass());
+ logger.debug("initializing bean " + getClass().getName());
+
+ attributes = Attributes.getUIComponentAttributes(UICollapsiblePanel.class,
getClass());
+
+ attributes.setAttribute("rendered", true);
+ attributes.setAttribute("header", "collapsible panel
header");
+
+ // TODO has to be tested in another way
+ attributes.remove("changeExpandListener");
+ attributes.remove("converter");
+
+ // hidden attributes
+ attributes.remove("changeExpandListeners");
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Added:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.properties
===================================================================
---
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.properties
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichCollapsiblePanelBean.properties 2010-09-15
13:20:36 UTC (rev 19216)
@@ -0,0 +1,4 @@
+attr.switchType.client=client
+attr.switchType.server=server
+attr.switchType.ajax=ajax
+attr.switchType.none=
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/facets.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/facets.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/facets.xhtml 2010-09-15
13:20:36 UTC (rev 19216)
@@ -0,0 +1,106 @@
+<!--
+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: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">
+ #{nonexistingbean.aaa}
+
+ <rich:collapsiblePanel id="collapsiblePanel"
+
bodyClass="#{richCollapsiblePanelBean.attributes['bodyClass'].value}"
+
bypassUpdates="#{richCollapsiblePanelBean.attributes['bypassUpdates'].value}"
+
data="#{richCollapsiblePanelBean.attributes['data'].value}"
+
dir="#{richCollapsiblePanelBean.attributes['dir'].value}"
+
execute="#{richCollapsiblePanelBean.attributes['execute'].value}"
+
expanded="#{richCollapsiblePanelBean.attributes['expanded'].value}"
+
header="#{richCollapsiblePanelBean.attributes['header'].value}"
+
headerClass="#{richCollapsiblePanelBean.attributes['headerClass'].value}"
+
headerControlClass="#{richCollapsiblePanelBean.attributes['headerControlClass'].value}"
+
immediate="#{richCollapsiblePanelBean.attributes['immediate'].value}"
+
itemChangeListener="#{richCollapsiblePanelBean.attributes['itemChangeListener'].value}"
+
lang="#{richCollapsiblePanelBean.attributes['lang'].value}"
+
limitToList="#{richCollapsiblePanelBean.attributes['limitToList'].value}"
+
onbeforedomupdate="#{richCollapsiblePanelBean.attributes['onbeforedomupdate'].value}"
+
onbeforeitemchange="#{richCollapsiblePanelBean.attributes['onbeforeitemchange'].value}"
+
onbeforeswitch="#{richCollapsiblePanelBean.attributes['onbeforeswitch'].value}"
+
onclick="#{richCollapsiblePanelBean.attributes['onclick'].value}"
+
oncomplete="#{richCollapsiblePanelBean.attributes['oncomplete'].value}"
+
ondblclick="#{richCollapsiblePanelBean.attributes['ondblclick'].value}"
+
onitemchange="#{richCollapsiblePanelBean.attributes['onitemchange'].value}"
+
onmousedown="#{richCollapsiblePanelBean.attributes['onmousedown'].value}"
+
onmousemove="#{richCollapsiblePanelBean.attributes['onmousemove'].value}"
+
onmouseout="#{richCollapsiblePanelBean.attributes['onmouseout'].value}"
+
onmouseover="#{richCollapsiblePanelBean.attributes['onmouseover'].value}"
+
onmouseup="#{richCollapsiblePanelBean.attributes['onmouseup'].value}"
+
onswitch="#{richCollapsiblePanelBean.attributes['onswitch'].value}"
+
render="#{richCollapsiblePanelBean.attributes['render'].value}"
+
rendered="#{richCollapsiblePanelBean.attributes['rendered'].value}"
+
status="#{richCollapsiblePanelBean.attributes['status'].value}"
+
style="#{richCollapsiblePanelBean.attributes['style'].value}"
+
styleClass="#{richCollapsiblePanelBean.attributes['styleClass'].value}"
+
switchType="#{richCollapsiblePanelBean.attributes['switchType'].value}"
+
title="#{richCollapsiblePanelBean.attributes['title'].value}"
+ >
+
+ <f:facet name="headerExpanded" >
+ header expanded
+ </f:facet>
+ <f:facet name="headerCollapsed" >
+ header collapsed
+ </f:facet>
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus a
neque turpis, at cursus nunc.
+ Vestibulum et tincidunt metus. Suspendisse viverra aliquet nunc, non
placerat justo commodo a. Pellentesque
+ non lacus ut mi consectetur blandit nec sed orci. Praesent tempus aliquet
sapien vitae condimentum. Aenean
+ nec ligula egestas erat convallis pharetra. Donec venenatis nunc vitae
justo posuere laoreet. Vestibulum
+ ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia
Curae; Suspendisse quis convallis nulla.
+ Aenean lorem lorem, viverra eget elementum in, hendrerit sit amet felis.
Curabitur venenatis lacus id diam
+ porttitor cursus. Suspendisse vulputate arcu at ante porttitor
ullamcorper. Cras eleifend lacus eget justo
+ malesuada fermentum. Praesent pretium eleifend lacus, id dignissim lacus
aliquam eu. Nulla imperdiet tempus
+ facilisis. Etiam nec aliquet quam. Duis fringilla ullamcorper libero, vel
dictum quam feugiat a. Donec placerat
+ varius diam ullamcorper egestas. Donec molestie tellus a felis facilisis
ac vestibulum risus rhoncus.
+
+ </rich:collapsiblePanel>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes
value="#{richCollapsiblePanelBean.attributes}" id="attributes"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/list.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/list.xhtml 2010-09-15
13:20:36 UTC (rev 19216)
@@ -0,0 +1,45 @@
+<!--
+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 Collapsible
Panel</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
+ Simple page that contains <b>rich:collapsiblePanel</b> and
input boxes for all its attributes.
+ </metamer:testPageLink>
+
+ <metamer:testPageLink id="facets" outcome="facets"
value="Facets">
+ Page for testing facets of <b>rich:collapsiblePanel</b>.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/simple.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/simple.xhtml 2010-09-15
13:20:36 UTC (rev 19216)
@@ -0,0 +1,99 @@
+<!--
+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: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">
+ #{nonexistingbean.aaa}
+
+ <rich:collapsiblePanel id="collapsiblePanel"
+
bodyClass="#{richCollapsiblePanelBean.attributes['bodyClass'].value}"
+
bypassUpdates="#{richCollapsiblePanelBean.attributes['bypassUpdates'].value}"
+
data="#{richCollapsiblePanelBean.attributes['data'].value}"
+
dir="#{richCollapsiblePanelBean.attributes['dir'].value}"
+
execute="#{richCollapsiblePanelBean.attributes['execute'].value}"
+
expanded="#{richCollapsiblePanelBean.attributes['expanded'].value}"
+
header="#{richCollapsiblePanelBean.attributes['header'].value}"
+
headerClass="#{richCollapsiblePanelBean.attributes['headerClass'].value}"
+
headerControlClass="#{richCollapsiblePanelBean.attributes['headerControlClass'].value}"
+
immediate="#{richCollapsiblePanelBean.attributes['immediate'].value}"
+
itemChangeListener="#{richCollapsiblePanelBean.attributes['itemChangeListener'].value}"
+
lang="#{richCollapsiblePanelBean.attributes['lang'].value}"
+
limitToList="#{richCollapsiblePanelBean.attributes['limitToList'].value}"
+
onbeforedomupdate="#{richCollapsiblePanelBean.attributes['onbeforedomupdate'].value}"
+
onbeforeitemchange="#{richCollapsiblePanelBean.attributes['onbeforeitemchange'].value}"
+
onbeforeswitch="#{richCollapsiblePanelBean.attributes['onbeforeswitch'].value}"
+
onclick="#{richCollapsiblePanelBean.attributes['onclick'].value}"
+
oncomplete="#{richCollapsiblePanelBean.attributes['oncomplete'].value}"
+
ondblclick="#{richCollapsiblePanelBean.attributes['ondblclick'].value}"
+
onitemchange="#{richCollapsiblePanelBean.attributes['onitemchange'].value}"
+
onmousedown="#{richCollapsiblePanelBean.attributes['onmousedown'].value}"
+
onmousemove="#{richCollapsiblePanelBean.attributes['onmousemove'].value}"
+
onmouseout="#{richCollapsiblePanelBean.attributes['onmouseout'].value}"
+
onmouseover="#{richCollapsiblePanelBean.attributes['onmouseover'].value}"
+
onmouseup="#{richCollapsiblePanelBean.attributes['onmouseup'].value}"
+
onswitch="#{richCollapsiblePanelBean.attributes['onswitch'].value}"
+
render="#{richCollapsiblePanelBean.attributes['render'].value}"
+
rendered="#{richCollapsiblePanelBean.attributes['rendered'].value}"
+
status="#{richCollapsiblePanelBean.attributes['status'].value}"
+
style="#{richCollapsiblePanelBean.attributes['style'].value}"
+
styleClass="#{richCollapsiblePanelBean.attributes['styleClass'].value}"
+
switchType="#{richCollapsiblePanelBean.attributes['switchType'].value}"
+
title="#{richCollapsiblePanelBean.attributes['title'].value}"
+ >
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus a
neque turpis, at cursus nunc.
+ Vestibulum et tincidunt metus. Suspendisse viverra aliquet nunc, non
placerat justo commodo a. Pellentesque
+ non lacus ut mi consectetur blandit nec sed orci. Praesent tempus aliquet
sapien vitae condimentum. Aenean
+ nec ligula egestas erat convallis pharetra. Donec venenatis nunc vitae
justo posuere laoreet. Vestibulum
+ ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia
Curae; Suspendisse quis convallis nulla.
+ Aenean lorem lorem, viverra eget elementum in, hendrerit sit amet felis.
Curabitur venenatis lacus id diam
+ porttitor cursus. Suspendisse vulputate arcu at ante porttitor
ullamcorper. Cras eleifend lacus eget justo
+ malesuada fermentum. Praesent pretium eleifend lacus, id dignissim lacus
aliquam eu. Nulla imperdiet tempus
+ facilisis. Etiam nec aliquet quam. Duis fringilla ullamcorper libero, vel
dictum quam feugiat a. Donec placerat
+ varius diam ullamcorper egestas. Donec molestie tellus a felis facilisis
ac vestibulum risus rhoncus.
+
+ </rich:collapsiblePanel>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes
value="#{richCollapsiblePanelBean.attributes}" id="attributes"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file