[jsr-314-open-mirror] [jsr-314-open] UIComponent.broadcast only propagate events on ClientBehavior instances

Leonardo Uribe lu4242 at gmail.com
Tue May 4 22:31:18 EDT 2010


Hi

Checking the new Behavior api (for implement cc:clientBehavior), I note that
the javadoc of UIComponent.broadcast says this:

"....Broadcast the specified FacesEvent to all registered event listeners
who have expressed an interest in events of this type. Listeners are called
in the order in which they were added.

If the event is an instance of BehaviorEvent and the current component is
the source of the event call BehaviorEvent.getBehavior() to get the Behavior
for the event. If the behavior implements ClientBehavior, call
Behavior.broadcast(javax.faces.event.BehaviorEvent)}....."

The wrong line is:

".....If the behavior implements ClientBehavior, call
Behavior.broadcast....."

So, if a user try to create a custom Behavior, the method broadcast() will
be useless, and custom behaviors will not catch events. I think it is a bug
on the javadoc, so I'll correct it on myfaces.

regards,

Leonardo Uribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20100504/a44e6db5/attachment-0002.html 


More information about the jsr-314-open-mirror mailing list