[richfaces-svn-commits] JBoss Rich Faces SVN: r18804 - in modules/tests/metamer/trunk/application/src/main: resources/org/richfaces/tests/metamer/bean and 2 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Thu Aug 19 07:55:44 EDT 2010
Author: ppitonak at redhat.com
Date: 2010-08-19 07:55:43 -0400 (Thu, 19 Aug 2010)
New Revision: 18804
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
RFPL-674
* added one page for rich:accordion
Added: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichAccordionBean.java 2010-08-19 11:55:43 UTC (rev 18804)
@@ -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.HtmlAccordion;
+
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:accordion.
+ *
+ * @author <a href="mailto:ppitonak at redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+ at ManagedBean(name = "richAccordionBean")
+ at ViewScoped
+public class RichAccordionBean 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(HtmlAccordion.class, getClass());
+
+ 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/RichAccordionBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
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-08-19 11:55:16 UTC (rev 18803)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-08-19 11:55:43 UTC (rev 18804)
@@ -108,7 +108,8 @@
components.put("a4jStatus", "A4J Status");
components.put("commandButton", "JSF Command Button");
components.put("hDataTable", "JSF Data Table");
- components.put("richColumn", "Rich Column Component");
+ components.put("richAccordion", "Rich Accordion");
+ components.put("richColumn", "Rich Column");
components.put("richComponentControl", "Rich Component Control");
components.put("richDataGrid", "Rich Data Grid");
components.put("richDataScroller", "Rich Data Scroller");
Added: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichAccordionBean.properties 2010-08-19 11:55:43 UTC (rev 18804)
@@ -0,0 +1,7 @@
+attr.dir.ltr=ltr
+attr.dir.rtl=rtl
+attr.dir.none=
+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/richAccordion/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/list.xhtml 2010-08-19 11:55:43 UTC (rev 18804)
@@ -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 Accordion</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple" value="Simple">
+ Simple page that contains <b>rich:accordion</b> with several panels and input boxes for all its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml 2010-08-19 11:55:43 UTC (rev 18804)
@@ -0,0 +1,137 @@
+<!--
+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">
+ <rich:accordion id="accordion"
+ activeItem="#{richAccordionBean.attributes['activeItem'].value}"
+ bypassUpdates="#{richAccordionBean.attributes['bypassUpdates'].value}"
+ converter="#{richAccordionBean.attributes['converter'].value}"
+ cycledSwitching="#{richAccordionBean.attributes['cycledSwitching'].value}"
+ data="#{richAccordionBean.attributes['data'].value}"
+ dir="#{richAccordionBean.attributes['dir'].value}"
+ execute="#{richAccordionBean.attributes['execute'].value}"
+ firstItem="#{richAccordionBean.attributes['firstItem'].value}"
+ immediate="#{richAccordionBean.attributes['immediate'].value}"
+ itemByIndex="#{richAccordionBean.attributes['itemByIndex'].value}"
+ itemChangeListener="#{richAccordionBean.attributes['itemChangeListener'].value}"
+ itemChangeListeners="#{richAccordionBean.attributes['itemChangeListeners'].value}"
+ itemContentClass="#{richAccordionBean.attributes['itemContentClass'].value}"
+ itemHeaderClass="#{richAccordionBean.attributes['itemHeaderClass'].value}"
+ itemHeaderClassActive="#{richAccordionBean.attributes['itemHeaderClassActive'].value}"
+ itemHeaderClassDisabled="#{richAccordionBean.attributes['itemHeaderClassDisabled'].value}"
+ itemHeaderClassInactive="#{richAccordionBean.attributes['itemHeaderClassInactive'].value}"
+ lang="#{richAccordionBean.attributes['lang'].value}"
+ lastItem="#{richAccordionBean.attributes['lastItem'].value}"
+ limitToList="#{richAccordionBean.attributes['limitToList'].value}"
+ localValue="#{richAccordionBean.attributes['localValue'].value}"
+ localValueSet="#{richAccordionBean.attributes['localValueSet'].value}"
+ nextItem="#{richAccordionBean.attributes['nextItem'].value}"
+ onbeforeitemchange="#{richAccordionBean.attributes['onbeforeitemchange'].value}"
+ onclick="#{richAccordionBean.attributes['onclick'].value}"
+ ondblclick="#{richAccordionBean.attributes['ondblclick'].value}"
+ onitemchange="#{richAccordionBean.attributes['onitemchange'].value}"
+ onmousedown="#{richAccordionBean.attributes['onmousedown'].value}"
+ onmousemove="#{richAccordionBean.attributes['onmousemove'].value}"
+ onmouseout="#{richAccordionBean.attributes['onmouseout'].value}"
+ onmouseover="#{richAccordionBean.attributes['onmouseover'].value}"
+ onmouseup="#{richAccordionBean.attributes['onmouseup'].value}"
+ prevItem="#{richAccordionBean.attributes['prevItem'].value}"
+ render="#{richAccordionBean.attributes['render'].value}"
+ rendered="#{richAccordionBean.attributes['rendered'].value}"
+ required="#{richAccordionBean.attributes['required'].value}"
+ status="#{richAccordionBean.attributes['status'].value}"
+ style="#{richAccordionBean.attributes['style'].value}"
+ styleClass="#{richAccordionBean.attributes['styleClass'].value}"
+ submittedActiveItem="#{richAccordionBean.attributes['submittedActiveItem'].value}"
+ submittedValue="#{richAccordionBean.attributes['submittedValue'].value}"
+ switchType="#{richAccordionBean.attributes['switchType'].value}"
+ title="#{richAccordionBean.attributes['title'].value}"
+ valid="#{richAccordionBean.attributes['valid'].value}"
+ value="#{richAccordionBean.attributes['value'].value}"
+ >
+
+ <rich:accordionItem id="item1" name="item1" header="Item 1">
+ content of item 1
+ </rich:accordionItem>
+ <rich:accordionItem id="item2" name="item2" header="Item 2">
+ content of item 2
+ </rich:accordionItem>
+ <rich:accordionItem id="item3" name="item3" header="Item 3">
+ content of item 3
+ </rich:accordionItem>
+ <rich:accordionItem id="item4" name="item4" header="Item 4">
+ content of item 4
+ </rich:accordionItem>
+ </rich:accordion>
+
+ <br/><br/>
+ <fieldset>
+ <legend>JavaScript API</legend>
+
+ <h:commandButton id="switchButton1" value="switch to item1">
+ <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item1" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton2" value="switch to item2">
+ <rich:componentControl id="componentControl2" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item2" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton3" value="switch to item3">
+ <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item3" />
+ </rich:componentControl>
+ </h:commandButton>
+ <h:commandButton id="switchButton4" value="switch to item4">
+ <rich:componentControl id="componentControl1" event="click" operation="switchToItem" target="accordion" >
+ <f:param value="item4" />
+ </rich:componentControl>
+ </h:commandButton>
+
+ </fieldset>
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richAccordionBean.attributes}" id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
More information about the richfaces-svn-commits
mailing list