Re: Review:revert to old listener restore mechanism

From: Jayashri Visvanathan <Jayashri.Visvanathan_at_Sun.COM>
Date: Tue, 17 May 2005 13:26:45 -0700

Hi Adam,
   In JSF 1.1 world, we didn't support multiple Method Binding
ActionListeners. So whenever a method binding action listener is added
from a constructor, it would be overridden by the saved listener if any
during restoreState. But now all listener registrations go through
addActionListener and we support methodExpression/methodBinding multiple
action listeners. This causes any listeners added via constructor to
accumulate. (I ran into this problem with our Graph Component demo which
registers a methodBinding ActionListener via its constructor. )



Adam Winer wrote:

> Ed Burns wrote:
>>>>>>> On Tue, 17 May 2005 10:53:49 -0700, Jayashri Visvanathan
>>>>>>> <Jayashri.Visvanathan_at_Sun.COM> said:
>> JV> M src/javax/faces/component/
>> JV> If we override the listeners list with the list persisted by the
>> JV> state saving mechanism, transient listeners will be lost.
>> JV> So revert back to the old way of restoring listeners.
>> This is fine. Make sure to add a readme that states that adding a
>> listener in the ctor is a bad idea.
> I don't think we can say "bad idea"; either the spec
> says it's completely illegal, or we need to support it.
> What's the issue with adding a listener in the constructor
> of a subclass of UIComponentBase?
> -- Adam
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail: