Author: ppitonak(a)redhat.com
Date: 2010-10-01 12:45:27 -0400 (Fri, 01 Oct 2010)
New Revision: 19417
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTabPanelBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/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-837
* added one page for rich:tabPanel
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-01
16:15:35 UTC (rev 19416)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-10-01
16:45:27 UTC (rev 19417)
@@ -131,6 +131,7 @@
components.put("richProgressBar", "Rich Progress Bar");
components.put("richSubTable", "Rich Subtable");
components.put("richSubTableToggleControl", "Rich Subtable Toggle
Control");
+ components.put("richTabPanel", "Rich Tab Panel");
components.put("richToggleControl", "Rich Toggle Control");
components.put("richTogglePanel", "Rich Toggle Panel");
components.put("richTogglePanelItem", "Rich Toggle Panel
Item");
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTabPanelBean.java 2010-10-01
16:45:27 UTC (rev 19417)
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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.HtmlTabPanel;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:tabPanel.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richTabPanelBean")
+@SessionScoped
+public class RichTabPanelBean 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(HtmlTabPanel.class,
getClass());
+
+ attributes.setAttribute("activeItem", "tab1");
+ attributes.setAttribute("rendered", true);
+
+ // TODO has to be tested in another way
+ attributes.remove("converter");
+ }
+
+ 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/RichTabPanelBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTabPanelBean.properties
===================================================================
---
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTabPanelBean.properties
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTabPanelBean.properties 2010-10-01
16:45:27 UTC (rev 19417)
@@ -0,0 +1,12 @@
+attr.dir.LTR=LTR
+attr.dir.RTL=RTL
+attr.dir.null=
+
+attr.headerAlignment.left=left
+attr.headerAlignment.right=right
+attr.headerAlignment.null=
+
+attr.switchType.client=client
+attr.switchType.server=server
+attr.switchType.ajax=ajax
+attr.switchType.null=
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/list.xhtml 2010-10-01
16:45:27 UTC (rev 19417)
@@ -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 Panel</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
+ Simple page containing <b>rich:tabPanel</b> and input boxes
for all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml 2010-10-01
16:45:27 UTC (rev 19417)
@@ -0,0 +1,153 @@
+<?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"
+
activeItem="#{richTabPanelBean.attributes['activeItem'].value}"
+
bypassUpdates="#{richTabPanelBean.attributes['bypassUpdates'].value}"
+
cycledSwitching="#{richTabPanelBean.attributes['cycledSwitching'].value}"
+
data="#{richTabPanelBean.attributes['data'].value}"
+
dir="#{richTabPanelBean.attributes['dir'].value}"
+
execute="#{richTabPanelBean.attributes['execute'].value}"
+
firstItem="#{richTabPanelBean.attributes['firstItem'].value}"
+
headerAlignment="#{richTabPanelBean.attributes['headerAlignment'].value}"
+
headerPosition="#{richTabPanelBean.attributes['headerPosition'].value}"
+
immediate="#{richTabPanelBean.attributes['immediate'].value}"
+
itemByIndex="#{richTabPanelBean.attributes['itemByIndex'].value}"
+
itemChangeListener="#{richTabPanelBean.attributes['itemChangeListener'].value}"
+
itemChangeListeners="#{richTabPanelBean.attributes['itemChangeListeners'].value}"
+
lang="#{richTabPanelBean.attributes['lang'].value}"
+
lastItem="#{richTabPanelBean.attributes['lastItem'].value}"
+
limitToList="#{richTabPanelBean.attributes['limitToList'].value}"
+
localValue="#{richTabPanelBean.attributes['localValue'].value}"
+
localValueSet="#{richTabPanelBean.attributes['localValueSet'].value}"
+
nextItem="#{richTabPanelBean.attributes['nextItem'].value}"
+
onbeforeitemchange="#{richTabPanelBean.attributes['onbeforeitemchange'].value}"
+
onclick="#{richTabPanelBean.attributes['onclick'].value}"
+
ondblclick="#{richTabPanelBean.attributes['ondblclick'].value}"
+
onitemchange="#{richTabPanelBean.attributes['onitemchange'].value}"
+
onmousedown="#{richTabPanelBean.attributes['onmousedown'].value}"
+
onmousemove="#{richTabPanelBean.attributes['onmousemove'].value}"
+
onmouseout="#{richTabPanelBean.attributes['onmouseout'].value}"
+
onmouseover="#{richTabPanelBean.attributes['onmouseover'].value}"
+
onmouseup="#{richTabPanelBean.attributes['onmouseup'].value}"
+
prevItem="#{richTabPanelBean.attributes['prevItem'].value}"
+
render="#{richTabPanelBean.attributes['render'].value}"
+
rendered="#{richTabPanelBean.attributes['rendered'].value}"
+
renderedItems="#{richTabPanelBean.attributes['renderedItems'].value}"
+
required="#{richTabPanelBean.attributes['required'].value}"
+
status="#{richTabPanelBean.attributes['status'].value}"
+
style="#{richTabPanelBean.attributes['style'].value}"
+
styleClass="#{richTabPanelBean.attributes['styleClass'].value}"
+
submittedActiveItem="#{richTabPanelBean.attributes['submittedActiveItem'].value}"
+
submittedValue="#{richTabPanelBean.attributes['submittedValue'].value}"
+
switchType="#{richTabPanelBean.attributes['switchType'].value}"
+
tabContentClass="#{richTabPanelBean.attributes['tabContentClass'].value}"
+
tabHeaderClass="#{richTabPanelBean.attributes['tabHeaderClass'].value}"
+
tabHeaderClassActive="#{richTabPanelBean.attributes['tabHeaderClassActive'].value}"
+
tabHeaderClassDisabled="#{richTabPanelBean.attributes['tabHeaderClassDisabled'].value}"
+
tabHeaderClassInactive="#{richTabPanelBean.attributes['tabHeaderClassInactive'].value}"
+
title="#{richTabPanelBean.attributes['title'].value}"
+
valid="#{richTabPanelBean.attributes['valid'].value}"
+
value="#{richTabPanelBean.attributes['value'].value}"
+ >
+
+ <rich:tab name="tab1" header="tab1 header">
+ content of tab 1
+ </rich:tab>
+ <rich:tab name="tab2" header="tab2 header">
+ content of tab 2
+ </rich:tab>
+ <rich:tab name="tab3" header="tab3 header">
+ content of tab 3
+ </rich:tab>
+ <rich:tab name="tab4" header="tab4 header"
disabled="true">
+ content of tab 4
+ </rich:tab>
+ <rich:tab name="tab5" header="tab5 header">
+ content of tab 5
+ </rich:tab>
+ </rich:tabPanel>
+
+ <br/><br/>
+ <fieldset>
+ <legend>JavaScript API</legend>
+
+ <script type="text/javascript">
+ testedComponentId =
"#{rich:clientId('tabPanel')}";
+ </script>
+
+ <h:commandButton id="switchButton1" value="switch to
tab1">
+ <rich:componentControl id="componentControl1"
event="click" operation="switchToItem" target="tabPanel"
>
+ <f:param value="tab1" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton2" value="switch to
tab2">
+ <rich:componentControl id="componentControl2"
event="click" operation="switchToItem" target="tabPanel"
>
+ <f:param value="tab2" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton3" value="switch to
tab3">
+ <rich:componentControl id="componentControl3"
event="click" operation="switchToItem" target="tabPanel"
>
+ <f:param value="tab3" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton4" value="switch to
tab4">
+ <rich:componentControl id="componentControl4"
event="click" operation="switchToItem" target="tabPanel"
>
+ <f:param value="tab4" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton5" value="switch to
tab5">
+ <rich:componentControl id="componentControl5"
event="click" operation="switchToItem" target="tabPanel"
>
+ <f:param value="tab5" />
+ </rich:componentControl>
+ </h:commandButton>
+
+ </fieldset>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richTabPanelBean.attributes}"
id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file