Hi Jocob,
The problem with the existing logic is as I had mentioned in the change
bundle, if there are any transient listeners, they will be lost if the
persisted listeners list overrides the internal list. Thats why we are
reverting back to the old way.
Thanks
-Jayashri
Jacob Hookom wrote:
> Doesn't the documented code in UIComponentBase (line 1310) mention
> correcting this issue?
>
> Object gets new'ed, listeners registered, restore state then copies
> over the internal list.
>
> -- Jacob
>
> Jayashri Visvanathan wrote:
>
>> 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. )
>>
>> Thanks
>> -Jayashri
>>
>>
>>
>> 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/UIComponentBase.java
>>>> 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: dev-unsubscribe_at_javaserverfaces.dev.java.net
>>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>>
>>
>
>