Author: ppitonak(a)redhat.com
Date: 2010-12-08 08:49:46 -0500 (Wed, 08 Dec 2010)
New Revision: 20462
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarBean.properties
Log:
https://jira.jboss.org/browse/RFPL-955
* added sample for rich:toolbarGroup
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-12-08
13:48:46 UTC (rev 20461)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-12-08
13:49:46 UTC (rev 20462)
@@ -147,6 +147,7 @@
components.put("richTogglePanel", "Rich Toggle Panel");
components.put("richTogglePanelItem", "Rich Toggle Panel
Item");
components.put("richToolbar", "Rich Toolbar");
+ components.put("richToolbarGroup", "Rich Toolbar Group");
components.put("richTooltip", "Rich Tooltip");
components.put("richTree", "Rich Tree");
}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.java 2010-12-08
13:49:46 UTC (rev 20462)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.UIToolbarGroup;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for rich:toolbar.
+ *
+ * @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richToolbarGroupBean")
+@ViewScoped
+public class RichToolbarGroupBean 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(UIToolbarGroup.class,
getClass(), false);
+
+ 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/RichToolbarGroupBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Modified:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarBean.properties
===================================================================
---
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarBean.properties 2010-12-08
13:48:46 UTC (rev 20461)
+++
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarBean.properties 2010-12-08
13:49:46 UTC (rev 20462)
@@ -3,4 +3,5 @@
attr.itemSeparator.square=square
attr.itemSeparator.disc=disc
attr.itemSeparator.grid=grid
+attr.itemSeparator.non-existing=non-existing
attr.itemSeparator.null=
Added:
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.properties
===================================================================
---
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.properties
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarGroupBean.properties 2010-12-08
13:49:46 UTC (rev 20462)
@@ -0,0 +1,8 @@
+attr.itemSeparator.none=none
+attr.itemSeparator.line=line
+attr.itemSeparator.square=square
+attr.itemSeparator.disc=disc
+attr.itemSeparator.grid=grid
+attr.itemSeparator.non-existing=non-existing
+attr.itemSeparator.null=
+
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/list.xhtml 2010-12-08
13:49:46 UTC (rev 20462)
@@ -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 Toolbar Group</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
+ Simple page containing a toolbar with several
<b>rich:toolbarGroup</b>s and inputs for all group's attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/simple.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbarGroup/simple.xhtml 2010-12-08
13:49:46 UTC (rev 20462)
@@ -0,0 +1,97 @@
+<?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>
+ <style type="text/css">
+ .pic {
+ margin-right: 2px;
+ margin-top: 2px;
+ }
+
+ .barsearch {
+ height: 14px;
+ width: 100px;
+ }
+ </style>
+ </ui:define>
+
+ <ui:define name="outOfTemplateBefore">
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:toolbar id="toolbar" height="28">
+
+ <rich:toolbarGroup id="group1"
+
itemClass="#{richToolbarGroupBean.attributes['itemClass'].value}"
+
itemSeparator="#{richToolbarGroupBean.attributes['itemSeparator'].value}"
+
itemStyle="#{richToolbarGroupBean.attributes['itemStyle'].value}"
+
location="#{richToolbarGroupBean.attributes['location'].value}"
+
onitemclick="#{richToolbarGroupBean.attributes['onitemclick'].value}"
+
onitemdblclick="#{richToolbarGroupBean.attributes['onitemdblclick'].value}"
+
onitemkeydown="#{richToolbarGroupBean.attributes['onitemkeydown'].value}"
+
onitemkeypress="#{richToolbarGroupBean.attributes['onitemkeypress'].value}"
+
onitemkeyup="#{richToolbarGroupBean.attributes['onitemkeyup'].value}"
+
onitemmousedown="#{richToolbarGroupBean.attributes['onitemmousedown'].value}"
+
onitemmousemove="#{richToolbarGroupBean.attributes['onitemmousemove'].value}"
+
onitemmouseout="#{richToolbarGroupBean.attributes['onitemmouseout'].value}"
+
onitemmouseover="#{richToolbarGroupBean.attributes['onitemmouseover'].value}"
+
onitemmouseup="#{richToolbarGroupBean.attributes['onitemmouseup'].value}"
+
rendered="#{richToolbarGroupBean.attributes['rendered'].value}"
+
style="#{richToolbarGroupBean.attributes['style'].value}"
+
styleClass="#{richToolbarGroupBean.attributes['styleClass'].value}"
+ >
+ <h:graphicImage library="images/icons"
name="create_doc.gif" styleClass="pic" />
+ <h:graphicImage library="images/icons"
name="create_folder.gif" styleClass="pic" />
+ <h:graphicImage library="images/icons"
name="copy.gif" styleClass="pic" />
+ <h:graphicImage library="images/icons"
name="save.gif" styleClass="pic" />
+ <h:graphicImage library="images/icons"
name="save_as.gif" styleClass="pic" />
+ <h:graphicImage library="images/icons"
name="save_all.gif" styleClass="pic" />
+ </rich:toolbarGroup>
+
+ <rich:toolbarGroup id="group2"
location="right">
+ <h:inputText id="input" styleClass="barsearch"
/>
+ <h:commandButton id="button" onclick="return
false;" value="Search" />
+ </rich:toolbarGroup>
+
+ </rich:toolbar>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richToolbarGroupBean.attributes}"
id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file