Author: jjamrich
Date: 2011-05-05 06:38:34 -0400 (Thu, 05 May 2011)
New Revision: 22466
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml
Log:
Add support for verify RF-10862
There is issue with a4j:ajax tag, adding listener to component with
valueChangeLister - listener set in a4j:ajax is ignored.
Add now support to test this issue in metamer
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-05-04
15:39:51 UTC (rev 22465)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-05-05
10:38:34 UTC (rev 22466)
@@ -393,8 +393,20 @@
* an event representing the activation of a user interface component
*/
public void valueChangeListener(ValueChangeEvent event) {
- logToPage("* value changed: " + event.getOldValue() + " ->
" + event.getNewValue());
+ logToPage("*1 value changed: " + event.getOldValue() + " ->
" + event.getNewValue());
}
+
+ /**
+ * A change event listener that logs to the page old and new value.
+ * This is 2nd ValueChacgeListener. Use 2 different listeners is
+ * useful when testing more than one listener definition for one component
+ *
+ * @param event
+ * an event representing the activation of a user interface component
+ */
+ public void changeEventListener(ValueChangeEvent event) {
+ logToPage("*2 value changed: " + event.getOldValue() + " ->
" + event.getNewValue());
+ }
public boolean getExecuteChecker() {
return true;
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml 2011-05-04
15:39:51 UTC (rev 22465)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richAutocomplete/autocomplete.xhtml 2011-05-05
10:38:34 UTC (rev 22466)
@@ -93,7 +93,12 @@
<a4j:ajax event="change"
render="#{richAutocompleteBean.ajaxAttributes['render'].value}"
-
execute="#{richAutocompleteBean.ajaxAttributes['execute'].value}"
/>
+
execute="#{richAutocompleteBean.ajaxAttributes['execute'].value}"
+ listener="#{richBean.changeEventListener}" />
+
+ <a4j:ajax event="selectitem" render="output"
+ listener="#{richBean.actionListener}"
+ />
</rich:autocomplete>