Author: jjamrich
Date: 2011-07-27 16:19:22 -0400 (Wed, 27 Jul 2011)
New Revision: 22570
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichEditorBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/simple.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
Add rich:editor into Metamer
RF-11050, RFPL-1541: Add rich:editor into test environment.
Build rich:editoc component from sources, in next build on Hudson
should be available in richfaces-ui snapshot, and built by following
instructions on richfaces wiki.
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 2011-07-27
12:45:48 UTC (rev 22569)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-07-27
20:19:22 UTC (rev 22570)
@@ -139,6 +139,7 @@
richComponents.put("richDragIndicator", "Rich Drag
Indicator");
richComponents.put("richDropTarget", "Rich Drop Target");
richComponents.put("richDropDownMenu", "Rich Drop Down
Menu");
+ richComponents.put("richEditor", "Rich Editor");
richComponents.put("richExtendedDataTable", "Rich Extended Data
Table");
richComponents.put("richFileUpload", "Rich File Upload");
richComponents.put("richFunctions", "Rich Functions");
Added:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichEditorBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichEditorBean.java
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichEditorBean.java 2011-07-27
20:19:22 UTC (rev 22570)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, 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.rich;
+
+import java.io.Serializable;
+
+import javax.annotation.PostConstruct;
+import javax.faces.bean.ManagedBean;
+
+import org.richfaces.component.UIEditor;
+import org.richfaces.tests.metamer.Attributes;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Managed bean for storing appropriate data for rich:editor component
+ *
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * @version $Revision$
+ */
+@ManagedBean(name = "richEditorBean")
+public class RichEditorBean implements Serializable {
+
+ public static final Logger LOG = LoggerFactory.getLogger(RichEditorBean.class);
+ /** Genrated serial UID */
+ private static final long serialVersionUID = -6029256813894981250L;
+
+ private Attributes attributes =
Attributes.getComponentAttributesFromFacesConfig(UIEditor.class, getClass());
+
+ @PostConstruct
+ public void init(){
+ attributes.setAttribute("rendered", Boolean.TRUE);
+ }
+
+ public Attributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(Attributes attributes) {
+ this.attributes = attributes;
+ }
+
+}
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/list.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/list.xhtml 2011-07-27
20:19:22 UTC (rev 22570)
@@ -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-2011, 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 Editor</ui:define>
+
+ <ui:define name="links">
+
+ <metamer:testPageLink id="simple" outcome="simple"
value="Simple">
+ Simple page containing <b>rich:editor</b> and inputs for all
its attributes.
+ </metamer:testPageLink>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/simple.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/simple.xhtml 2011-07-27
20:19:22 UTC (rev 22570)
@@ -0,0 +1,71 @@
+<?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: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-2011, 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="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+
+ <rich:editor id="editor"
+
converter="#{richEditorBean.attributes['converter'].value}"
+
converterMessage="#{richEditorBean.attributes['converterMessage'].value}"
+ height="#{richEditorBean.attributes['height'].value}"
+
immediate="#{richEditorBean.attributes['immediate'].value}"
+ onblur="#{richEditorBean.attributes['onblur'].value}"
+
onchange="#{richEditorBean.attributes['onchange'].value}"
+
onfocus="#{richEditorBean.attributes['onfocus'].value}"
+
oninit="#{richEditorBean.attributes['oninit'].value}"
+
readonly="#{richEditorBean.attributes['readonly'].value}"
+
rendered="#{richEditorBean.attributes['rendered'].value}"
+
required="#{richEditorBean.attributes['required'].value}"
+ style="#{richEditorBean.attributes['style'].value}"
+
styleClass="#{richEditorBean.attributes['styleClass'].value}"
+ title="#{richEditorBean.attributes['title'].value}"
+
toolbar="#{richEditorBean.attributes['toolbar'].value}"
+
validator="#{richEditorBean.attributes['validator'].value}"
+
validatorMessage="#{richEditorBean.attributes['validatorMessage'].value}"
+ value="#{richEditorBean.attributes['value'].value}"
+
valueChangeListener="#{richEditorBean.attributes['valueChangeListener'].value}"
+ width="#{richEditorBean.attributes['width'].value}"
+ />
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richEditorBean.attributes}"
id="attributes" render="log"/>
+ </ui:define>
+
+ </ui:composition>
+</html>