Hi Martin<br><br><div class="gmail_quote">2010/5/4 Martin Marinschek <span dir="ltr"><<a href="mailto:mmarinschek@apache.org">mmarinschek@apache.org</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Leonardo,<br>
<br>
just so that I get you right: you are saying that broadcast should be<br>
called in any case, not only if the behaviour is a ClientBehavior?<br>
<br></blockquote><div><br>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.<br>
<br>best regards,<br><br>Leonardo Uribe <br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
(sorry if this question doesn't make a lot of sense; I am not too deep<br>
in the behavior stuff right now ;)<br>
<br>
best regards,<br>
<br>
Martin<br>
<div><div></div><div class="h5"><br>
On 5/5/10, Leonardo Uribe <<a href="mailto:lu4242@gmail.com">lu4242@gmail.com</a>> wrote:<br>
> Hi<br>
><br>
> Checking the new Behavior api (for implement cc:clientBehavior), I note that<br>
> the javadoc of UIComponent.broadcast says this:<br>
><br>
> "....Broadcast the specified FacesEvent to all registered event listeners<br>
> who have expressed an interest in events of this type. Listeners are called<br>
> in the order in which they were added.<br>
><br>
> If the event is an instance of BehaviorEvent and the current component is<br>
> the source of the event call BehaviorEvent.getBehavior() to get the Behavior<br>
> for the event. If the behavior implements ClientBehavior, call<br>
> Behavior.broadcast(javax.faces.event.BehaviorEvent)}....."<br>
><br>
> The wrong line is:<br>
><br>
> ".....If the behavior implements ClientBehavior, call<br>
> Behavior.broadcast....."<br>
><br>
> So, if a user try to create a custom Behavior, the method broadcast() will<br>
> be useless, and custom behaviors will not catch events. I think it is a bug<br>
> on the javadoc, so I'll correct it on myfaces.<br>
><br>
> regards,<br>
><br>
> Leonardo Uribe<br>
><br>
<br>
<br>
</div></div>--<br>
<br>
<a href="http://www.irian.at" target="_blank">http://www.irian.at</a><br>
<br>
Your JSF powerhouse -<br>
JSF Consulting, Development and<br>
Courses in English and German<br>
<br>
Professional Support for Apache MyFaces<br>
</blockquote></div><br>