You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2011/06/20 17:58:47 UTC

[jira] [Resolved] (MYFACES-3179) Inconsistent behaviour implementing and registering SystemEventListeners for PostAddToViewEvents

     [ https://issues.apache.org/jira/browse/MYFACES-3179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-3179.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.2
                   2.0.8
         Assignee: Leonardo Uribe

> Inconsistent behaviour implementing and registering SystemEventListeners for PostAddToViewEvents
> ------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3179
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3179
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.7, 2.1.0, 2.1.1
>         Environment: Tested on Tomcat 7
>            Reporter: Deryk Sinotte
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.8, 2.1.2
>
>         Attachments: listeners.zip
>
>
> I've developed a test case (which will be attached) which is a simple JSF app that has 3 different methods of registering SystemEventListeners for PostAddToViewEvents:
>     1) via @ListenFor annotations
>     2) via definition in faces-config.xml
>     3) via programmatically adding the listener through an eagerly created application scoped bean
> Then I ran this tst case with the following JSF implemenations:
>     * Mojarra 2.1
>     * MyFaces 2.0.7
>     * MyFaces 2.1.0
>     * MyFaces 2.1.1
> The behaviour can be summarized as follows:
> Method 1 - Annotations
> All implementations: The listener instance is never constructed or used.  (Perhaps it's a limitation of the annotation processing in Tomcat?)
> Method 2 - Defining in faces-config.xml
> Mojarra 2.1: An instance of the listener is created and used appropriately.
> MyFaces 2.*: An instance of the listener is created but the isListenerFor() and processEvent() methods are never called.
> Method 3 - Programmatic registration
> All implementations: An instance of the listener is created and used appropriately.
> So the question is why, when the listeners are defined in the faces-config file, are the listeners created but never called.  Other MyFaces JIRAs that might have some relevance:
> https://issues.apache.org/jira/browse/MYFACES-2509
> https://issues.apache.org/jira/browse/MYFACES-2638
> Bottom line is that only the programmatic approach appears to be reliable across the 2 implementations.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira