[richfaces-svn-commits] JBoss Rich Faces SVN: r18813 - in modules/tests/metamer/trunk/application/src/main: webapp/components and 1 other directories.

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


Author: ppitonak at redhat.com
Date: 2010-08-19 10:00:05 -0400 (Thu, 19 Aug 2010)
New Revision: 18813

Added:
   modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java
   modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/
   modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml
   modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml
Log:
RFPL-739

* added one page for rich:togglePanelItem


Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java	                        (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichTogglePanelItemBean.java	2010-08-19 14:00:05 UTC (rev 18813)
@@ -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.HtmlTogglePanelItem;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:togglePanelItem.
+ *
+ * @author <a href="mailto:ppitonak at redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+ at ManagedBean(name = "richTogglePanelItemBean")
+ at ViewScoped
+public class RichTogglePanelItemBean 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(HtmlTogglePanelItem.class, getClass());
+
+        attributes.setAttribute("name", "item1");
+        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/RichTogglePanelItemBean.java
___________________________________________________________________
Name: svn:keywords
   + Revision

Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml	                        (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/list.xhtml	2010-08-19 14:00:05 UTC (rev 18813)
@@ -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 Toggle Panel Item</ui:define>
+
+        <ui:define name="links">
+
+            <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+                Page containing a toggle panel with 3 <b>rich:togglePanelItem</b>s and inputs for all its attributes.
+            </metamer:testPageLink>
+
+        </ui:define>
+
+    </ui:composition>
+
+</html>

Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml	                        (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanelItem/simple.xhtml	2010-08-19 14:00:05 UTC (rev 18813)
@@ -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: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 id="tcLink1" value="Toggle Panel Item 1">
+                <rich:toggleControl id="toggleControl1" targetPanel="richTogglePanel" targetItem="item1" />
+            </h:commandLink>
+            <h:outputText value=" | " />
+            <h:commandLink id="tcLink2" value="Toggle Panel Item 2">
+                <rich:toggleControl id="toggleControl2" targetPanel="richTogglePanel" targetItem="item2" />
+            </h:commandLink>
+            <h:outputText value=" | " />
+            <h:commandLink id="tcLink3" value="Toggle Panel Item 3">
+                <rich:toggleControl id="toggleControl3" targetPanel="richTogglePanel" targetItem="item3" />
+            </h:commandLink>
+
+            <br/><br/>
+
+            <rich:togglePanel id="richTogglePanel" activeItem="item1" switchType="client">
+                <rich:togglePanelItem id="item1"
+                                      active="#{richTogglePanelItemBean.attributes['active'].value}"
+                                      converter="#{richTogglePanelItemBean.attributes['converter'].value}"
+                                      dir="#{richTogglePanelItemBean.attributes['dir'].value}"
+                                      lang="#{richTogglePanelItemBean.attributes['lang'].value}"
+                                      localValue="#{richTogglePanelItemBean.attributes['localValue'].value}"
+                                      name="#{richTogglePanelItemBean.attributes['name'].value}"
+                                      onclick="#{richTogglePanelItemBean.attributes['onclick'].value}"
+                                      ondblclick="#{richTogglePanelItemBean.attributes['ondblclick'].value}"
+                                      onenter="#{richTogglePanelItemBean.attributes['onenter'].value}"
+                                      onleave="#{richTogglePanelItemBean.attributes['onleave'].value}"
+                                      onmousedown="#{richTogglePanelItemBean.attributes['onmousedown'].value}"
+                                      onmousemove="#{richTogglePanelItemBean.attributes['onmousemove'].value}"
+                                      onmouseout="#{richTogglePanelItemBean.attributes['onmouseout'].value}"
+                                      onmouseover="#{richTogglePanelItemBean.attributes['onmouseover'].value}"
+                                      onmouseup="#{richTogglePanelItemBean.attributes['onmouseup'].value}"
+                                      rendered="#{richTogglePanelItemBean.attributes['rendered'].value}"
+                                      style="#{richTogglePanelItemBean.attributes['style'].value}"
+                                      styleClass="#{richTogglePanelItemBean.attributes['styleClass'].value}"
+                                      switchType="#{richTogglePanelItemBean.attributes['switchType'].value}"
+                                      title="#{richTogglePanelItemBean.attributes['title'].value}"
+                                      value="#{richTogglePanelItemBean.attributes['value'].value}">
+                    <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">
+            <br/>
+            Attributes for the first toggle panel item:
+            <br/><br/>
+            <metamer:attributes value="#{richTogglePanelItemBean.attributes}" id="attributes" />
+        </ui:define>
+
+    </ui:composition>
+</html>
\ No newline at end of file



More information about the richfaces-svn-commits mailing list