System event listener state saving
----------------------------------
Key: TRINIDAD-1764
URL: https://issues.apache.org/jira/browse/TRINIDAD-1764
Project: MyFaces Trinidad
Issue Type: Bug
Components: Components
Affects Versions: 2.0.0-alpha
Reporter: Andy Schwartz
The JSF specification requires that UIComponent provide implementations for the
following new system event-related methods:
- subscribeToEvent()
- unsubscribeFromEvent()
- getListenersForEventClass()
Both Mojarra and MyFaces provide implementations of these methods in
UIComponent.
However, UIComponent itself does not provide any state saving implementation.
This is provided by UIComponentBase - ie. UIComponentBase handles state saving
for system event listeners stored on the UIComponent instance.
This approach is flawed in that it only provides correct behavior for component
implementations that extend UIComponentBase. Components that extend
UIComponent directly will be subtly broken in that system event listeners can
be registered, but will not be state saved. Furthermore, since the system
event listener storage in UIComponent is package-private, there is no way for
components that extend UIComponent directly to handle state saving for
registered listeners.
The only option is for components that extend UIComponent directly to implement
their own (redundant) storage for system event listeners so that the component
implementation can provide its own state saving implementation.
Since all of the Trinidad components extend UIComponent (not UIComponentBase),
we'll need to implement such a solution in UIXComponentBase.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.