Author: jjamrich
Date: 2011-08-08 18:53:18 -0400 (Mon, 08 Aug 2011)
New Revision: 22608
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/reloadEditor.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/list.xhtml
Log:
Add example for editors reload, and reload within container
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/list.xhtml 2011-08-08
22:53:02 UTC (rev 22607)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/list.xhtml 2011-08-08
22:53:18 UTC (rev 22608)
@@ -34,6 +34,10 @@
<metamer:testPageLink id="simple" outcome="simple"
value="Simple">
Simple page containing <b>rich:editor</b> and inputs for all
its attributes.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="reloadEditor"
outcome="reloadEditor" value="Reload and Rerender">
+ Simple page containing <b>rich:editor</b> and controls for
testing reload and rerender container with editor
+ </metamer:testPageLink>
</ui:define>
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/reloadEditor.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/reloadEditor.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richEditor/reloadEditor.xhtml 2011-08-08
22:53:18 UTC (rev 22608)
@@ -0,0 +1,68 @@
+<?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-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:messages globalOnly="true" />
+ <rich:messages for="editor" />
+
+ <a4j:outputPanel id="panel">
+ <rich:editor id="editor"
+
value="#{richEditorBean.attributes['value'].value}"
+
valueChangeListener="#{richBean.valueChangeListenerImproved}" />
+ </a4j:outputPanel>
+
+ <br/>
+ <h:commandButton id="hButton" value="[h] Submit"
/>
+ <a4j:commandButton id="a4jButton" value="[a4j] Submit"
render="output" />
+
+ <br/>
+ <a4j:commandButton render="panel" />
+ <a4j:commandButton render="editor" />
+
+ <br/><br/>
+ Your text: <h:outputText id="output"
value="#{richEditorBean.attributes['value'].value}"/>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ <metamer:attributes value="#{richEditorBean.attributes}"
id="attributes" />
+ </ui:define>
+
+ </ui:composition>
+</html>