javaserverfaces-spec-public
  1. javaserverfaces-spec-public
  2. JAVASERVERFACES_SPEC_PUBLIC-798

UIComponent.broadcast only propagate events on ClientBehavior instances

    Details

    • Issuezilla Id:
      798
    • Status Whiteboard:
      Hide

      changelog

      Show
      changelog

      Description

      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.

        Activity

        Hide
        Ed Burns added a comment -

        move to p2.

        Show
        Ed Burns added a comment - move to p2.
        Hide
        Ed Burns added a comment -

        take ownership.

        Show
        Ed Burns added a comment - take ownership.
        Hide
        Ed Burns added a comment -

        Fix checked in.

        Show
        Ed Burns added a comment - Fix checked in.
        Hide
        Ed Burns added a comment -

        Forgot to mark FIXED.

        Show
        Ed Burns added a comment - Forgot to mark FIXED.
        Hide
        rogerk added a comment -

        changelog

        Show
        rogerk added a comment - changelog
        Hide
        Manfred Riem added a comment -

        Closing resolved issue out

        Show
        Manfred Riem added a comment - Closing resolved issue out

          People

          • Assignee:
            Ed Burns
            Reporter:
            lu4242
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: