Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIComponent.broadcast only propagate events on ClientBehavior instances #798

Closed
eclipse-faces-bot opened this issue May 13, 2010 · 10 comments

Comments

@eclipse-faces-bot
Copy link

Comments from: [jsr-314-open] UIComponent.broadcast only propagate events on
ClientBehavior instances

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.

Martin Marinschek says:

just so that I get you right: you are saying that broadcast should be
called in any case, not only if the behaviour is a ClientBehavior?

Leonardo Uribe says:

Yes, the Behavior interface has only one method: broadcast(). It does not have
sense to put a method on a base class that only will be called for an specific
child class (in this case ClientBehavior). I think the intention of the
programmer here is call it always.

Environment

Operating System: All
Platform: All

Affected Versions

[2.0]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by lu4242

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
move to p2.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
take ownership.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Fix checked in.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Forgot to mark FIXED.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
rogerk said:
changelog

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Tuesday, June 22nd 2010, 4:12:15 am

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@manfredriem said:
Closing resolved issue out

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-798

@eclipse-faces-bot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant