myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marinschek (JIRA)" <>
Subject [jira] Updated: (MYFACES-1712) FacesListeners get added to components twice causing event to be raised twice.
Date Fri, 28 Sep 2007 07:30:51 GMT


Martin Marinschek updated MYFACES-1712:

       Resolution: Fixed
    Fix Version/s: 1.2.1-SNAPSHOT
         Assignee: Martin Marinschek
           Status: Resolved  (was: Patch Available)

> FacesListeners get added to components twice causing event to be raised twice.
> ------------------------------------------------------------------------------
>                 Key: MYFACES-1712
>                 URL:
>             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
> 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.

View raw message