Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-21113

Incorrect JSF Phase Listener Warning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.1.Beta1
    • 4.3.0.Final
    • jsf
    • None

      When adding a JSF phase listener to faces-config.xml

      <lifecycle>
         <phase-listener>com.demo.web.jsf.JsfCdiPhaseListener</phase-listener>
      </lifecycle>
      

      You are presented a warning that phase-listener references to "com.demo.web.jsf.JsfCdiPhaseListener" that does not extend javax.faces.event.PhaseListener

      In reality you cannot extend javax.faces.event.PhaseListener you must implement it. So this check should be looking for implements rather than extends. See http://balusc.omnifaces.org/2006/09/debug-jsf-lifecycle.html

      In java 8 at least you get a compiler error if you try and extend avax.faces.event.PhaseListener.

      The type PhaseListener cannot be the superclass of JsfCdiPhaseListener; a superclass must be a class

            scabanovich Viacheslav Kabanovich (Inactive)
            cody.lerum@gmail.com Cody Lerum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: