Author: jjamrich
Date: 2011-09-23 18:33:15 -0400 (Fri, 23 Sep 2011)
New Revision: 22758
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml
Log:
RFPL-1424: add page with example of valueChangeListener and ajax with listener
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml 2011-09-23
22:33:15 UTC (rev 22758)
@@ -0,0 +1,85 @@
+<?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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich"
+
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/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">
+ <h:panelGrid columns="3">
+ <h:column>
+ h:inputText:
+ </h:column>
+ <h:column>
+ <h:inputText id="simpleText1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output1" />
+ </h:inputText>
+ </h:column>
+ <h:column>
+ <h:inputText id="simpleText2"
value="#{a4jAjaxBean.input}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output1" />
+ </h:inputText>
+ </h:column>
+
+ <h:column>
+ rich:autocomplete:
+ </h:column>
+ <h:column>
+ <rich:autocomplete id="autocomplete1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output1" />
+ </rich:autocomplete>
+ </h:column>
+ <rich:autocomplete id="autocomplete2"
value="#{a4jAjaxBean.input}">
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output1" />
+ </rich:autocomplete>
+ <h:column>
+ </h:column>
+ </h:panelGrid>
+
+ <br/>
+ <a4j:outputPanel id="output1" layout="block">
+ Output: <h:outputText value="#{a4jAjaxBean.input}"/>
+ </a4j:outputPanel>
+
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml 2011-09-23
22:32:57 UTC (rev 22757)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml 2011-09-23
22:33:15 UTC (rev 22758)
@@ -89,6 +89,10 @@
<metamer:testPageLink id="hSelectOneListbox"
outcome="hSelectOneListbox" value="Select One Listbox">
Simple page that contains <b>h:selectOneListbox</b> with
<b>a4j:ajax</b> and input boxes for all its attributes.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="eventHandlers"
outcome="eventHandlers" value="Event handlers for various
components">
+ Simple page that contains <b>various components</b> with
<b>a4j:ajax</b> with event handler to tests collisions on this attribute
+ </metamer:testPageLink>
</ui:define>