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

Thomas Fischer updated MYFACES-1712:
------------------------------------

    Status: Patch Available  (was: Reopened)

> FacesListeners get added to components twice causing event to be raised twice.
> ------------------------------------------------------------------------------
>
>                 Key: MYFACES-1712
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1712
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions:  1.2.0
>         Environment: Windows XP, Tomcat 6.0, jdk6, MyFaces 1.2.0, Tomahawk 
> 1.1.5
>            Reporter: Andrew Redman
>            Assignee: Martin Marinschek
>             Fix For: 1.2.1-SNAPSHOT
>
>         Attachments: myfaces-1712-patch.txt
>
>
> On components that have an actionListener set or valueChangeListener, these 
> listeners are added to the component instance twice. At runtime this causes 
> the method to be called with the event twice. For example I have the 
> following component
> <h:selectOneMenu id="Applications" onchange="submit()" 
> valueChangeListener="#{EditPage.processApplicationChange}">
> my processApplicationChange method is invoke twice.
> I have tracked this down the UIComponentELTag and UIComponentClassicTagBase 
> classes. The UIComponentClassicTagBase calls createComponent in the 
> findComponent method and then calls setProperties. However the 
> createComponent method that is implemented in UIComponentELTag also calls 
> setProperties. The setProperties routine is what adds any listeners to a 
> collection. Therefore they get added twice. By removing the setProperties in 
> UIComponentELTag createComponent and leaving it up to the findComponent 
> method fixes the issue. I'm not sure however if this will have other 
> implications although as yet I have found no issues.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to