[richfaces-svn-commits] JBoss Rich Faces SVN: r18489 - in root/tests/metamer/trunk/application/src/main: resources/org/richfaces/tests/metamer/bean and 3 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Aug 5 10:06:33 EDT 2010


Author: ppitonak at redhat.com
Date: 2010-08-05 10:06:32 -0400 (Thu, 05 Aug 2010)
New Revision: 18489

Added:
   root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java
   root/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTogglePanelBean.properties
   root/tests/metamer/trunk/application/src/main/webapp/WEB-INF/jboss-web.xml
   root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/
   root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml
   root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml
   root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/simple.xhtml
Modified:
   root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
RFPL-675

* added two pages for rich:togglePanel
* added jboss-web containing context root



Modified: root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
--- root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java	2010-08-05 11:19:05 UTC (rev 18488)
+++ root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java	2010-08-05 14:06:32 UTC (rev 18489)
@@ -117,6 +117,7 @@
         components.put("richPanel", "Rich Panel");
         components.put("richSubTable", "Rich Subtable");
         components.put("richSubTableToggleControl", "Rich Subtable Toggle Control");
+        components.put("richTogglePanel", "Rich Toggle Panel");
     }
 
     private void createSkinList() {

Added: root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java
===================================================================
--- root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java	                        (rev 0)
+++ root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java	2010-08-05 14:06:32 UTC (rev 18489)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * 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.html.HtmlTogglePanel;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:togglePanel.
+ *
+ * @author <a href="mailto:ppitonak at redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+ at ManagedBean(name = "richTogglePanelBean")
+ at ViewScoped
+public class RichTogglePanelBean implements Serializable {
+
+    private static final long serialVersionUID = 67812341568562249L;
+    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(HtmlTogglePanel.class, getClass());
+
+        attributes.setAttribute("activeItem", "item1");
+        attributes.setAttribute("rendered", true);
+    }
+
+    public Attributes getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(Attributes attributes) {
+        this.attributes = attributes;
+    }
+}


Property changes on: root/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelBean.java
___________________________________________________________________
Name: svn:keywords
   + Revision

Added: root/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTogglePanelBean.properties
===================================================================
--- root/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTogglePanelBean.properties	                        (rev 0)
+++ root/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichTogglePanelBean.properties	2010-08-05 14:06:32 UTC (rev 18489)
@@ -0,0 +1,6 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.none=
+attr.switchType.client=client
+attr.switchType.ajax=ajax
+attr.switchType.null=
\ No newline at end of file

Added: root/tests/metamer/trunk/application/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/WEB-INF/jboss-web.xml	                        (rev 0)
+++ root/tests/metamer/trunk/application/src/main/webapp/WEB-INF/jboss-web.xml	2010-08-05 14:06:32 UTC (rev 18489)
@@ -0,0 +1,3 @@
+<jboss-web>
+    <context-root>metamer</context-root>
+</jboss-web>
\ No newline at end of file

Added: root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml	                        (rev 0)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/list.xhtml	2010-08-05 14:06:32 UTC (rev 18489)
@@ -0,0 +1,48 @@
+<!--
+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"
+      xmlns:h="http://java.sun.com/jsf/html">
+
+    <ui:composition template="/templates/list.xhtml">
+
+        <ui:define name="pageTitle">Rich Toggle Panel</ui:define>
+
+        <ui:define name="links">
+
+            <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+                Page containing <b>rich:togglePanel</b> and inputs for all its attributes.
+            </metamer:testPageLink>
+
+            <metamer:testPageLink id="rf9013" outcome="rf9013" value="RF-9013 Toggle panel: not valid markup">
+                Page for issue <h:outputLink value="https://jira.jboss.org/browse/RF-9013">RF-9013</h:outputLink>. The page contains
+                a <b>rich:togglePanel</b>. Verify that there are no unnecessary attributes (e.g. styleClass="null" or dir="null") and
+                that the page is W3C compliant.
+            </metamer:testPageLink>
+
+        </ui:define>
+
+    </ui:composition>
+
+</html>

Added: root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml	                        (rev 0)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/rf9013.xhtml	2010-08-05 14:06:32 UTC (rev 18489)
@@ -0,0 +1,74 @@
+<!--
+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">
+
+            <h:commandLink value="Toggle Panel Item 1">
+                <rich:toggleControl forPanel="panel1" targetItem="item1" />
+            </h:commandLink>
+            <h:outputText value=" | " />
+            <h:commandLink value="Toggle Panel Item 2">
+                <rich:toggleControl forPanel="panel1" targetItem="item2" />
+            </h:commandLink>
+            <h:outputText value=" | " />
+            <h:commandLink value="Toggle Panel Item 3">
+                <rich:toggleControl forPanel="panel1" targetItem="item3" />
+            </h:commandLink>
+
+            <br/><br/>
+
+            <rich:togglePanel id="panel1" activeItem="item1">
+                <rich:togglePanelItem id="item1" name="item1">
+                    <p>content of panel 1</p>
+                </rich:togglePanelItem>
+                <rich:togglePanelItem id="item2" name="item2">
+                    <p>content of panel 2</p>
+                </rich:togglePanelItem>
+                <rich:togglePanelItem id="item3" name="item3">
+                    <p>content of panel 3</p>
+                </rich:togglePanelItem>
+            </rich:togglePanel>
+        </ui:define>
+
+        <ui:define name="outOfTemplateAfter">
+        </ui:define>
+
+    </ui:composition>
+</html>
\ No newline at end of file

Added: root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/simple.xhtml
===================================================================
--- root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/simple.xhtml	                        (rev 0)
+++ root/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/simple.xhtml	2010-08-05 14:06:32 UTC (rev 18489)
@@ -0,0 +1,117 @@
+<!--
+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">
+            
+            <h:commandLink value="Toggle Panel Item 1">
+                <rich:toggleControl forPanel="richTogglePanel" targetItem="item1" />
+            </h:commandLink>
+            <h:outputText value=" | " />
+            <h:commandLink value="Toggle Panel Item 2">
+                <rich:toggleControl forPanel="richTogglePanel" targetItem="item2" />
+            </h:commandLink>
+            <h:outputText value=" | " />
+            <h:commandLink value="Toggle Panel Item 3">
+                <rich:toggleControl forPanel="richTogglePanel" targetItem="item3" />
+            </h:commandLink>
+
+            <br/><br/>
+
+            <rich:togglePanel id="richTogglePanel"
+                              activeItem="#{richTogglePanelBean.attributes['activeItem'].value}"
+                              bypassUpdates="#{richTogglePanelBean.attributes['bypassUpdates'].value}"
+                              converter="#{richTogglePanelBean.attributes['converter'].value}"
+                              data="#{richTogglePanelBean.attributes['data'].value}"
+                              dir="#{richTogglePanelBean.attributes['dir'].value}"
+                              execute="#{richTogglePanelBean.attributes['execute'].value}"
+                              firstItem="#{richTogglePanelBean.attributes['firstItem'].value}"
+                              immediate="#{richTogglePanelBean.attributes['immediate'].value}"
+                              itemByIndex="#{richTogglePanelBean.attributes['itemByIndex'].value}"
+                              itemChangeListener="#{richTogglePanelBean.attributes['itemChangeListener'].value}"
+                              itemChangeListeners="#{richTogglePanelBean.attributes['itemChangeListeners'].value}"
+                              lang="#{richTogglePanelBean.attributes['lang'].value}"
+                              lastItem="#{richTogglePanelBean.attributes['lastItem'].value}"
+                              limitToList="#{richTogglePanelBean.attributes['limitToList'].value}"
+                              localValue="#{richTogglePanelBean.attributes['localValue'].value}"
+                              localValueSet="#{richTogglePanelBean.attributes['localValueSet'].value}"
+                              nextItem="#{richTogglePanelBean.attributes['nextItem'].value}"
+                              onbeforedomupdate="#{richTogglePanelBean.attributes['onbeforedomupdate'].value}"
+                              onclick="#{richTogglePanelBean.attributes['onclick'].value}"
+                              oncomplete="#{richTogglePanelBean.attributes['oncomplete'].value}"
+                              ondblclick="#{richTogglePanelBean.attributes['ondblclick'].value}"
+                              onitemchange="#{richTogglePanelBean.attributes['onitemchange'].value}"
+                              onitemchanged="#{richTogglePanelBean.attributes['onitemchanged'].value}"
+                              onmousedown="#{richTogglePanelBean.attributes['onmousedown'].value}"
+                              onmousemove="#{richTogglePanelBean.attributes['onmousemove'].value}"
+                              onmouseout="#{richTogglePanelBean.attributes['onmouseout'].value}"
+                              onmouseover="#{richTogglePanelBean.attributes['onmouseover'].value}"
+                              onmouseup="#{richTogglePanelBean.attributes['onmouseup'].value}"
+                              prevItem="#{richTogglePanelBean.attributes['prevItem'].value}"
+                              render="#{richTogglePanelBean.attributes['render'].value}"
+                              rendered="#{richTogglePanelBean.attributes['rendered'].value}"
+                              required="#{richTogglePanelBean.attributes['required'].value}"
+                              status="#{richTogglePanelBean.attributes['status'].value}"
+                              style="#{richTogglePanelBean.attributes['style'].value}"
+                              styleClass="#{richTogglePanelBean.attributes['styleClass'].value}"
+                              submittedActiveItem="#{richTogglePanelBean.attributes['submittedActiveItem'].value}"
+                              submittedValue="#{richTogglePanelBean.attributes['submittedValue'].value}"
+                              switchType="#{richTogglePanelBean.attributes['switchType'].value}"
+                              title="#{richTogglePanelBean.attributes['title'].value}"
+                              valid="#{richTogglePanelBean.attributes['valid'].value}"
+                              value="#{richTogglePanelBean.attributes['value'].value}"
+                              >
+                <rich:togglePanelItem id="item1" name="item1">
+                    <p>content of panel 1</p>
+                </rich:togglePanelItem>
+                <rich:togglePanelItem id="item2" name="item2">
+                    <p>content of panel 2</p>
+                </rich:togglePanelItem>
+                <rich:togglePanelItem id="item3" name="item3">
+                    <p>content of panel 3</p>
+                </rich:togglePanelItem>
+            </rich:togglePanel>
+        </ui:define>
+
+        <ui:define name="outOfTemplateAfter">
+            <metamer:attributes value="#{richTogglePanelBean.attributes}" id="attributes" />
+        </ui:define>
+
+    </ui:composition>
+</html>
\ No newline at end of file



More information about the richfaces-svn-commits mailing list