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

Leonardo Uribe lu4242 at gmail.com
Thu May 13 23:08:29 EDT 2010


Hi

I created an issue here:

https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=798

regards,

Leonardo Uribe

2010/5/5 Martin Marinschek <mmarinschek at apache.org>

> Hi Leonardo,
>
> Ah well, I totally agree. Looks like the (wrong) remainder of a
> refactoring to me.
>
> best regards,
>
> Martin
>
> On 5/5/10, Leonardo Uribe <lu4242 at gmail.com> wrote:
> > Hi Martin
> >
> > 2010/5/4 Martin Marinschek <mmarinschek at apache.org>
> >
> >> Hi Leonardo,
> >>
> >> 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?
> >>
> >>
> > 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.
> >
> > best regards,
> >
> > Leonardo Uribe
> >
> >
> >> (sorry if this question doesn't make a lot of sense; I am not too deep
> >> in the behavior stuff right now ;)
> >>
> >> best regards,
> >>
> >> Martin
> >>
> >> On 5/5/10, Leonardo Uribe <lu4242 at gmail.com> wrote:
> >> > 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
> >> >
> >>
> >>
> >> --
> >>
> >> http://www.irian.at
> >>
> >> Your JSF powerhouse -
> >> JSF Consulting, Development and
> >> Courses in English and German
> >>
> >> Professional Support for Apache MyFaces
> >>
> >
>
>
> --
>
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20100513/5ef75311/attachment-0002.html 


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