Author: ppitonak(a)redhat.com
Date: 2010-12-03 10:27:10 -0500 (Fri, 03 Dec 2010)
New Revision: 20362
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
Log:
* added universal itemChangeListener
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 2010-12-03
15:24:19 UTC (rev 20361)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2010-12-03
15:27:10 UTC (rev 20362)
@@ -39,6 +39,7 @@
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
import javax.servlet.http.HttpSession;
+import org.richfaces.event.ItemChangeEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -373,10 +374,20 @@
}
/**
+ * An item change listener that logs to the page old and new value.
+ *
+ * @param event
+ * an event representing the activation of a user interface component
+ */
+ public void itemChangeListener(ItemChangeEvent event) {
+ RichBean.logToPage("* item changed: " + event.getOldItem() + "
-> " + event.getNewItem());
+ }
+
+ /**
* A value change listener that logs to the page old and new value.
*
* @param event
- * an event representing the activation of a user interface component (not
used)
+ * an event representing the activation of a user interface component
*/
public void valueChangeListener(ValueChangeEvent event) {
RichBean.logToPage("* value changed: " + event.getOldValue() + "
-> " + event.getNewValue());
Show replies by date