M src/javax/faces/component/UIComponentBase.java
If we override the listeners list with the list persisted by the
state saving mechanism, transient listeners will be lost.
So revert back to the old way of restoring listeners.
Index: src/javax/faces/component/UIComponentBase.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-api/src/javax/faces/component/UIComponentBase.java,v
retrieving revision 1.107
diff -u -r1.107 UIComponentBase.java
--- src/javax/faces/component/UIComponentBase.java 5 May 2005 20:51:03 -0000 1.107
+++ src/javax/faces/component/UIComponentBase.java 17 May 2005 17:30:50 -0000
@@ -1307,10 +1307,19 @@
rendered = ((Boolean) values[4]).booleanValue();
renderedSet = ((Boolean) values[5]).booleanValue();
rendererType = (String) values[6];
- // if there were some listeners registered prior to this
- // method being invoked, override them with the list to be
- // restored in order to prevent accumulation.
- listeners = (List) restoreAttachedState(context, values[7]);
+ List restoredListeners = null;
+ if (null != (restoredListeners = (List)
+ restoreAttachedState(context, values[7]))) {
+ // if there were some listeners registered prior to this
+ // method being invoked, merge them with the list to be
+ // restored.
+ if (null != listeners) {
+ listeners.addAll(restoredListeners);
+ }
+ else {
+ listeners = restoredListeners;
+ }
+ }
}