Author: ppitonak(a)redhat.com
Date: 2010-12-08 06:55:26 -0500 (Wed, 08 Dec 2010)
New Revision: 20452
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/copy.gif
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/create_doc.gif
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/create_folder.gif
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/open.gif
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/save.gif
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/save_all.gif
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/save_as.gif
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
https://jira.jboss.org/browse/RF-9761
* added one sample for rich:toolbar
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
11:34:06 UTC (rev 20451)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-12-08
11:55:26 UTC (rev 20452)
@@ -146,6 +146,7 @@
components.put("richToggleControl", "Rich Toggle Control");
components.put("richTogglePanel", "Rich Toggle Panel");
components.put("richTogglePanelItem", "Rich Toggle Panel
Item");
+ components.put("richToolbar", "Rich Toolbar");
components.put("richTooltip", "Rich Tooltip");
components.put("richTree", "Rich Tree");
}
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichToolbarBean.java 2010-12-08
11:55:26 UTC (rev 20452)
@@ -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.SessionScoped;
+import org.richfaces.component.UIToolbar;
+
+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 = "richToolbarBean")
+@SessionScoped
+public class RichToolbarBean 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(UIToolbar.class, getClass());
+
+ attributes.setAttribute("height", 28);
+ 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/RichToolbarBean.java
___________________________________________________________________
Name: svn:keywords
+ Revision
Added:
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
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichToolbarBean.properties 2010-12-08
11:55:26 UTC (rev 20452)
@@ -0,0 +1,6 @@
+attr.itemSeparator.none=none
+attr.itemSeparator.line=line
+attr.itemSeparator.square=square
+attr.itemSeparator.disc=disc
+attr.itemSeparator.grid=grid
+attr.itemSeparator.null=
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/list.xhtml 2010-12-08
11:55:26 UTC (rev 20452)
@@ -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</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
+ Simple page containing <b>rich:toolbar</b> and inputs for all
its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/simple.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richToolbar/simple.xhtml 2010-12-08
11:55:26 UTC (rev 20452)
@@ -0,0 +1,101 @@
+<?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="#{richToolbarBean.attributes['height'].value}"
+
itemClass="#{richToolbarBean.attributes['itemClass'].value}"
+
itemSeparator="#{richToolbarBean.attributes['itemSeparator'].value}"
+
itemStyle="#{richToolbarBean.attributes['itemStyle'].value}"
+
onitemclick="#{richToolbarBean.attributes['onitemclick'].value}"
+
onitemdblclick="#{richToolbarBean.attributes['onitemdblclick'].value}"
+
onitemkeydown="#{richToolbarBean.attributes['onitemkeydown'].value}"
+
onitemkeypress="#{richToolbarBean.attributes['onitemkeypress'].value}"
+
onitemkeyup="#{richToolbarBean.attributes['onitemkeyup'].value}"
+
onitemmousedown="#{richToolbarBean.attributes['onitemmousedown'].value}"
+
onitemmousemove="#{richToolbarBean.attributes['onitemmousemove'].value}"
+
onitemmouseout="#{richToolbarBean.attributes['onitemmouseout'].value}"
+
onitemmouseover="#{richToolbarBean.attributes['onitemmouseover'].value}"
+
onitemmouseup="#{richToolbarBean.attributes['onitemmouseup'].value}"
+
rendered="#{richToolbarBean.attributes['rendered'].value}"
+
style="#{richToolbarBean.attributes['style'].value}"
+
styleClass="#{richToolbarBean.attributes['styleClass'].value}"
+
width="#{richToolbarBean.attributes['width'].value}"
+ >
+
+ <rich:toolbarGroup>
+ <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" />
+ </rich:toolbarGroup>
+
+ <rich:toolbarGroup>
+ <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 location="right">
+ <h:inputText styleClass="barsearch" />
+ <h:commandButton onclick="return false;"
value="Search" />
+ </rich:toolbarGroup>
+
+ </rich:toolbar>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richToolbarBean.attributes}"
id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/copy.gif
===================================================================
(Binary files differ)
Property changes on:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/copy.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/create_doc.gif
===================================================================
(Binary files differ)
Property changes on:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/create_doc.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/create_folder.gif
===================================================================
(Binary files differ)
Property changes on:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/create_folder.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/open.gif
===================================================================
(Binary files differ)
Property changes on:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/open.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/save.gif
===================================================================
(Binary files differ)
Property changes on:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/save.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/save_all.gif
===================================================================
(Binary files differ)
Property changes on:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/save_all.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/save_as.gif
===================================================================
(Binary files differ)
Property changes on:
modules/tests/metamer/trunk/application/src/main/webapp/resources/images/icons/save_as.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream