Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2 Sprint 8
    • Fix Version/s: 2.2
    • Component/s: Components/Renderers
    • Labels:
      None
    • Status Whiteboard:
      Hide

      size_medium importance_medium

      Show
      size_medium importance_medium

      Description

      UIComponent defines the pair of:

      void subscribeToEvent(Class<? extends SystemEvent>, ComponentSystemEventListener)
      void unsubscribeFromEvent(Class<? extends SystemEvent>, ComponentSystemEventListener)

      The rationale given for ComponentSystemEventListener is that, being installed on a specific component, there is no need for an instance to implement the full-blown SystemEventListener interface. It was not desired that ComponentSystemEventListener be an abstract class itself implementing SystemEventListener presumably because (a) that would force a listener into a particular inheritance hierarchy and (b) in order to narrow the argument accepted for .processEvent(), would most likely have necessitated the introduction of generics into the SystemEventListener taxonomy. The point at which the inconsistency arises is when UIComponent defines:

      List<SystemEventListener> getListenersForEventClass(Class<? extends SystemEvent>)

      Ignoring the contrived possibility that all ComponentSystemEventListeners installed on a given UIComponent also implement SystemEventListener, the getListeners... method is meaningless and cannot return the objects registered via subscribeToEvent().

      1. 20120201-1427-i_spec_997.patch
        1 kB
        Ed Burns
      2. changebundle.txt
        40 kB
        Ed Burns

        Activity

        Hide
        rogerk added a comment -

        triage

        Show
        rogerk added a comment - triage
        Hide
        Ed Burns added a comment -

        Sending jsf-api/src/main/java/javax/faces/component/UIComponent.java
        Sending jsf-api/src/main/java/javax/faces/event/ComponentSystemEvent.java
        Sending jsf-api/src/main/java/javax/faces/event/SystemEvent.java
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/build.xml
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/pom.xml
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src/main
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src/main/java
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src/main/java/com
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src/main/java/com/sun
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src/main/java/com/sun/faces
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src/main/java/com/sun/faces/regression
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src/main/java/com/sun/faces/regression/i_spec_997
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src/main/java/com/sun/faces/regression/i_spec_997/Issue997TestCase.java
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_htmlunit/src/main/resources
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/pom.xml
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/java
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/java/com
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/java/com/sun
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/java/com/sun/faces
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/java/com/sun/faces/i_spec_997
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/java/com/sun/faces/i_spec_997/ListenerForComponent.java
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/java/com/sun/faces/i_spec_997/ListenersForComponent.java
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/resources
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/resources/META-INF
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/resources/META-INF/faces-config.xml
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_jar/src/main/resources/META-INF/i_jsf_1948.taglib.xml
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_war
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_war/pom.xml
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_war/src
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_war/src/main
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_war/src/main/java
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_war/src/main/webapp
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_war/src/main/webapp/WEB-INF
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_war/src/main/webapp/WEB-INF/web.xml
        Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-997/i_spec_997_war/src/main/webapp/main.xhtml
        Sending jsf-test/build.xml
        Transmitting file data ...............
        Committed revision 9035.

        Show
        Ed Burns added a comment - Sending jsf-api/src/main/java/javax/faces/component/UIComponent.java Sending jsf-api/src/main/java/javax/faces/event/ComponentSystemEvent.java Sending jsf-api/src/main/java/javax/faces/event/SystemEvent.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /build.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/pom.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src/main Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src/main/java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src/main/java/com Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src/main/java/com/sun Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src/main/java/com/sun/faces Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src/main/java/com/sun/faces/regression Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src/main/java/com/sun/faces/regression/i_spec_997 Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src/main/java/com/sun/faces/regression/i_spec_997/Issue997TestCase.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_htmlunit/src/main/resources Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/pom.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/java/com Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/java/com/sun Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/java/com/sun/faces Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/java/com/sun/faces/i_spec_997 Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/java/com/sun/faces/i_spec_997/ListenerForComponent.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/java/com/sun/faces/i_spec_997/ListenersForComponent.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/resources Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/resources/META-INF Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/resources/META-INF/faces-config.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_jar/src/main/resources/META-INF/i_jsf_1948.taglib.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_war Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_war/pom.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_war/src Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_war/src/main Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_war/src/main/java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_war/src/main/webapp Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_war/src/main/webapp/WEB-INF Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_war/src/main/webapp/WEB-INF/web.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-997 /i_spec_997_war/src/main/webapp/main.xhtml Sending jsf-test/build.xml Transmitting file data ............... Committed revision 9035.
        Hide
        dougd added a comment -

        I am hitting a ClassCastException when calling to ComponentSystemEvent.processListener(ComponentSystemEventListener).

        This is due to the fact that we call SystemEvent.processListener() from ComponentSystemEvent.processListenerwhich is now trying to cast to a SystemEventListener(). The issue is that ComponentSystemEventLIstener and SystemEventListener are peers. This is unlike ComponentSystemEvent which is a SystemEvent in the hierarchy.

        Show
        dougd added a comment - I am hitting a ClassCastException when calling to ComponentSystemEvent.processListener(ComponentSystemEventListener). This is due to the fact that we call SystemEvent.processListener() from ComponentSystemEvent.processListenerwhich is now trying to cast to a SystemEventListener(). The issue is that ComponentSystemEventLIstener and SystemEventListener are peers. This is unlike ComponentSystemEvent which is a SystemEvent in the hierarchy.
        Hide
        Ed Burns added a comment -

        Sending jsf-api/src/main/java/javax/faces/event/ComponentSystemEvent.java
        Transmitting file data .
        Committed revision 9630.

        Show
        Ed Burns added a comment - Sending jsf-api/src/main/java/javax/faces/event/ComponentSystemEvent.java Transmitting file data . Committed revision 9630.
        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:
            Matt Benson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: