Author: ppitonak(a)redhat.com
Date: 2010-10-15 06:35:57 -0400 (Fri, 15 Oct 2010)
New Revision: 19578
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
https://jira.jboss.org/browse/RFPL-875
* one page for rich:tab 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-10-15
00:28:55 UTC (rev 19577)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-10-15
10:35:57 UTC (rev 19578)
@@ -132,6 +132,7 @@
components.put("richProgressBar", "Rich Progress Bar");
components.put("richSubTable", "Rich Subtable");
components.put("richSubTableToggleControl", "Rich Subtable Toggle
Control");
+ components.put("richTab", "Rich Tab");
components.put("richTabPanel", "Rich Tab Panel");
components.put("richToggleControl", "Rich Toggle Control");
components.put("richTogglePanel", "Rich Toggle Panel");
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java 2010-10-15
10:35:57 UTC (rev 19578)
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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.html.HtmlTab;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:tab.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTabBean")
+@SessionScoped
+public class RichTabBean 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(HtmlTab.class, getClass());
+
+ attributes.setAttribute("header", "tab1 header");
+ attributes.setAttribute("name", "tab1");
+ attributes.setAttribute("rendered", true);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+}
Property changes on:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/list.xhtml 2010-10-15
10:35:57 UTC (rev 19578)
@@ -0,0 +1,42 @@
+<?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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+ <!--
+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/list.xhtml">
+
+ <ui:define name="pageTitle">Rich Tab</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
+ Simple page containing rich:tabPanel with several
<b>rich:tab</b>s and input boxes for all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTab/simple.xhtml 2010-10-15
10:35:57 UTC (rev 19578)
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+ <ui:define name="head">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:tabPanel id="tabPanel">
+ <rich:tab id="tab1"
+
active="#{richTabBean.attributes['active'].value}"
+
contentClass="#{richTabBean.attributes['contentClass'].value}"
+
converter="#{richTabBean.attributes['converter'].value}"
+ dir="#{richTabBean.attributes['dir'].value}"
+
disabled="#{richTabBean.attributes['disabled'].value}"
+
header="#{richTabBean.attributes['header'].value}"
+
headerClass="#{richTabBean.attributes['headerClass'].value}"
+
headerClassActive="#{richTabBean.attributes['headerClassActive'].value}"
+
headerClassDisabled="#{richTabBean.attributes['headerClassDisabled'].value}"
+
headerClassInactive="#{richTabBean.attributes['headerClassInactive'].value}"
+
headerStyle="#{richTabBean.attributes['headerStyle'].value}"
+
lang="#{richTabBean.attributes['lang'].value}"
+
localValue="#{richTabBean.attributes['localValue'].value}"
+
name="#{richTabBean.attributes['name'].value}"
+
onclick="#{richTabBean.attributes['onclick'].value}"
+
ondblclick="#{richTabBean.attributes['ondblclick'].value}"
+
onenter="#{richTabBean.attributes['onenter'].value}"
+
onheaderclick="#{richTabBean.attributes['onheaderclick'].value}"
+
onheaderdblclick="#{richTabBean.attributes['onheaderdblclick'].value}"
+
onheadermousedown="#{richTabBean.attributes['onheadermousedown'].value}"
+
onheadermousemove="#{richTabBean.attributes['onheadermousemove'].value}"
+
onheadermouseup="#{richTabBean.attributes['onheadermouseup'].value}"
+
onleave="#{richTabBean.attributes['onleave'].value}"
+
onmousedown="#{richTabBean.attributes['onmousedown'].value}"
+
onmousemove="#{richTabBean.attributes['onmousemove'].value}"
+
onmouseout="#{richTabBean.attributes['onmouseout'].value}"
+
onmouseover="#{richTabBean.attributes['onmouseover'].value}"
+
onmouseup="#{richTabBean.attributes['onmouseup'].value}"
+
rendered="#{richTabBean.attributes['rendered'].value}"
+
style="#{richTabBean.attributes['style'].value}"
+
styleClass="#{richTabBean.attributes['styleClass'].value}"
+
switchType="#{richTabBean.attributes['switchType'].value}"
+
tabPanel="#{richTabBean.attributes['tabPanel'].value}"
+
title="#{richTabBean.attributes['title'].value}"
+
value="#{richTabBean.attributes['value'].value}"
+ >
+ content of tab 1
+ </rich:tab>
+ <rich:tab id="tab2" name="tab2" header="tab2
header">
+ content of tab 2
+ </rich:tab>
+ <rich:tab id="tab3" name="tab3" header="tab3
header">
+ content of tab 3
+ </rich:tab>
+ <rich:tab id="tab4" name="tab4" header="tab4
header" disabled="true">
+ content of tab 4
+ </rich:tab>
+ <rich:tab id="tab5" name="tab5" header="tab5
header">
+ content of tab 5
+ </rich:tab>
+ </rich:tabPanel>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ Attributes for the first tab:
+ <metamer:attributes value="#{richTabBean.attributes}"
id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file