Author: jjamrich
Date: 2011-10-09 22:04:36 -0400 (Sun, 09 Oct 2011)
New Revision: 22769
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/defaultEventHandlers.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml
Log:
RFPL-1424: add more components to check event handler
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java 2011-10-06
20:38:24 UTC (rev 22768)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/a4j/A4JAjaxBean.java 2011-10-10
02:04:36 UTC (rev 22769)
@@ -53,6 +53,7 @@
private static Logger logger;
private Attributes attributes;
private String input;
+ private List<?> inputs;
private List<String> cars;
private String car;
private boolean boolVal;
@@ -199,4 +200,12 @@
public void causeErrorListener(AjaxBehaviorEvent event) {
throw new FacesException("Ajax request caused an error. This is intentional
behavior.");
}
+
+ public List<?> getInputs() {
+ return inputs;
+ }
+
+ public void setInputs(List<?> inputs) {
+ this.inputs = inputs;
+ }
}
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/defaultEventHandlers.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/defaultEventHandlers.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/defaultEventHandlers.xhtml 2011-10-10
02:04:36 UTC (rev 22769)
@@ -0,0 +1,160 @@
+<?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="2">
+ <h:column>
+ h:inputText:
+ </h:column>
+ <h:column>
+ <h:inputText id="simpleText1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </h:inputText>
+ </h:column>
+
+ <h:column>
+ rich:accordion
+ </h:column>
+ <h:column>
+ <ui:remove>
+ <!-- rich:accordion id="accordion"
itemChangeListener="#{richBean.itemChangeListener}" >
+ <rich:accordionItem id="item1"
name="item1" header="Item 1">
+ content of item 1
+ </rich:accordionItem>
+ <rich:accordionItem id="item2"
name="item2" header="Item 2">
+ content of item 2
+ </rich:accordionItem>
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:accordion-->
+ </ui:remove>
+ </h:column>
+
+ <h:column>
+ rich:autocomplete:
+ </h:column>
+ <h:column>
+ <rich:autocomplete id="autocomplete1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:autocomplete>
+ </h:column>
+
+ <h:column>
+ rich:calendar
+ </h:column>
+ <h:column>
+ <rich:calendar id="calendar"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:calendar>
+ </h:column>
+
+ <h:column>
+ rich:editor
+ </h:column>
+ <h:column>
+ <ui:remove>
+ <!-- rich:editor id="editor1"
value="#{a4jAjaxBean.input}" width="310px" height="40px"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:editor-->
+ </ui:remove>
+ </h:column>
+
+ <h:column>
+ rich:inplaceInput
+ </h:column>
+ <h:column>
+ <ui:remove>
+ <!--rich:inplaceInput id="inplaceInput"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:inplaceInput-->
+ </ui:remove>
+ </h:column>
+
+ <h:column>
+ rich:inplaceSelect
+ </h:column>
+ <h:column>
+ <rich:inplaceSelect id="inplaceSelect"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <f:selectItem itemLabel="x" itemValue="x"
/>
+ <f:selectItem itemLabel="y" itemValue="y"
/>
+ <f:selectItem itemLabel="z" itemValue="z"
/>
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:inplaceSelect>
+ </h:column>
+
+ <h:column>
+ rich:inputNumberSlider
+ </h:column>
+ <h:column>
+ <rich:inputNumberSlider id="inputNumberSlider"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:inputNumberSlider>
+ </h:column>
+
+ <h:column>
+ rich:inputNumberSpinner
+ </h:column>
+ <h:column>
+ <rich:inputNumberSpinner id="inputNumberSpinner"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax listener="#{richBean.actionListener}"
render="output" />
+ </rich:inputNumberSpinner>
+ </h:column>
+
+ </h:panelGrid>
+
+ <br/>
+ <a4j:outputPanel id="output" 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/eventHandlers.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml 2011-10-06
20:38:24 UTC (rev 22768)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml 2011-10-10
02:04:36 UTC (rev 22769)
@@ -70,6 +70,21 @@
</h:column>
<h:column>
+ rich:calendar
+ </h:column>
+ <h:column>
+ <rich:calendar id="calendar1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:calendar>
+ </h:column>
+ <h:column>
+ <rich:calendar id="calendar2"
value="#{a4jAjaxBean.input}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:calendar>
+ </h:column>
+
+ <h:column>
rich:editor
</h:column>
<h:column>
@@ -84,6 +99,73 @@
</rich:editor>
</h:column>
+ <h:column>
+ rich:inplaceInput
+ </h:column>
+ <h:column>
+ <rich:inplaceInput id="inplaceInput1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inplaceInput>
+ </h:column>
+ <h:column>
+ <rich:inplaceInput id="inplaceInput2"
value="#{a4jAjaxBean.input}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inplaceInput>
+ </h:column>
+
+ <h:column>
+ rich:inplaceSelect
+ </h:column>
+ <h:column>
+ <rich:inplaceSelect id="inplaceSelect1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <f:selectItem itemLabel="x" itemValue="x"
/>
+ <f:selectItem itemLabel="y" itemValue="y"
/>
+ <f:selectItem itemLabel="z" itemValue="z"
/>
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inplaceSelect>
+ </h:column>
+ <h:column>
+ <rich:inplaceSelect id="inplaceSelect2"
value="#{a4jAjaxBean.input}" >
+ <f:selectItem itemLabel="x" itemValue="x"
/>
+ <f:selectItem itemLabel="y" itemValue="y"
/>
+ <f:selectItem itemLabel="z" itemValue="z"
/>
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inplaceSelect>
+ </h:column>
+
+ <h:column>
+ rich:inputNumberSlider
+ </h:column>
+ <h:column>
+ <rich:inputNumberSlider id="inputNumberSlider1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inputNumberSlider>
+ </h:column>
+ <h:column>
+ <rich:inputNumberSlider id="inputNumberSlider2"
value="#{a4jAjaxBean.input}">
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inputNumberSlider>
+ </h:column>
+
+ <h:column>
+ rich:inputNumberSpinner
+ </h:column>
+ <h:column>
+ <rich:inputNumberSpinner id="inputNumberSpinner1"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inputNumberSpinner>
+ </h:column>
+ <h:column>
+ <rich:inputNumberSpinner id="inputNumberSpinner2"
value="#{a4jAjaxBean.input}"
+
valueChangeListener="#{richBean.valueChangeListener}" >
+ <a4j:ajax event="change"
listener="#{richBean.actionListener}" render="output" />
+ </rich:inputNumberSpinner>
+ </h:column>
+
</h:panelGrid>
<br/>
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-10-06
20:38:24 UTC (rev 22768)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml 2011-10-10
02:04:36 UTC (rev 22769)
@@ -93,6 +93,10 @@
<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>
+
+ <metamer:testPageLink id="defaultEventHandlers"
outcome="defaultEventHandlers" value="Default event handlers for various
components">
+ Simple page that contains <b>various components</b> with
<b>a4j:ajax</b> with default event handler
+ </metamer:testPageLink>
</ui:define>