[richfaces-svn-commits] JBoss Rich Faces SVN: r18719 - modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Aug 17 11:57:42 EDT 2010


Author: lfryc at redhat.com
Date: 2010-08-17 11:57:42 -0400 (Tue, 17 Aug 2010)
New Revision: 18719

Added:
   modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/instantAttributes.xhtml
Modified:
   modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/list.xhtml
Log:
a4j:status - added page for testing instant changes in attributes (especially event listener onerror, onsuccess, etc.) (RFPL-735)

Added: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/instantAttributes.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/instantAttributes.xhtml	                        (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/instantAttributes.xhtml	2010-08-17 15:57:42 UTC (rev 18719)
@@ -0,0 +1,91 @@
+<!--
+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:a4j="http://richfaces.org/a4j"
+	xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+	xmlns:c="http://java.sun.com/jsp/jstl/core">
+
+<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>
+			<c:set var="dontRenderForm" value="#{true}" />
+		</f:metadata>
+	</ui:define>
+
+	<ui:define name="outOfTemplateBefore">
+	</ui:define>
+
+	<ui:define name="component">
+		<h:form id="componentForm">
+			<fieldset style="height: 3em"><legend>status
+			(inside form)</legend> <a4j:status id="status"
+				converter="#{a4jStatusBean.attributes['converter'].value}"
+				localValue="#{a4jStatusBean.attributes['localValue'].value}"
+				onerror="#{a4jStatusBean.attributes['onerror'].value}"
+				onstart="#{a4jStatusBean.attributes['onstart'].value}"
+				onstop="#{a4jStatusBean.attributes['onstop'].value}"
+				onsuccess="#{a4jStatusBean.attributes['onsuccess'].value}"
+				rendered="#{a4jStatusBean.attributes['rendered'].value}"
+				value="#{a4jStatusBean.attributes['value'].value}">
+
+                <f:facet name="start">
+                    <h:outputText id="statusTextStart" style="font-size: large; color: red;" value="START" />
+                </f:facet>
+
+                <f:facet name="stop">
+                    <h:outputText id="statusTextStop" style="font-size: large; color: red;" value="STOP" />
+                </f:facet>
+
+                <f:facet name="error">
+                    <h:outputText id="statusTextError" style="font-size: large; color: red;" value="ERROR" />
+                </f:facet>
+            </a4j:status></fieldset>
+
+			<br />
+			<a4j:commandButton id="button1" value="Send Ajax Request" />
+			<br />
+			<a4j:commandButton id="button2" value="Send Ajax Request" />
+			<br />
+			<a4j:commandButton id="button3"
+				value="Send Ajax Request Causing Error"
+				action="#{a4jStatusBean.causeError}" />
+		</h:form>
+	</ui:define>
+
+	<ui:define name="outOfTemplateAfter">
+		<h:form id="attributesForm">
+			<metamer:attributes value="#{a4jStatusBean.attributes}"
+				id="attributes" type="ajax" render="status" />
+		</h:form>
+	</ui:define>
+
+</ui:composition>
+</html>
\ No newline at end of file

Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/list.xhtml	2010-08-17 15:57:04 UTC (rev 18718)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jStatus/list.xhtml	2010-08-17 15:57:42 UTC (rev 18719)
@@ -41,6 +41,11 @@
             <metamer:testPageLink id="referencedUsage" outcome="referencedUsage" value="Referenced Usage">
                 Page that contains two text inputs and two <b>a4j:status</b>es (one for each input).
             </metamer:testPageLink>
+            
+            <metamer:testPageLink id="instantAttributes" outcome="instantAttributes" value="Instant Attributes">
+                <div>Page that contains an <b>a4j:status</b> placed ouside of form so that it is common for whole view.</div>
+                <div>Applies the <b>attributes using Ajax instantly</b> without whole page rerender.</div>
+            </metamer:testPageLink>
 
         </ui:define>
 



More information about the richfaces-svn-commits mailing list