Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1100

EventListener called several times for a single form event if caching disabled


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.1
    • Component/s: tapestry-core
    • Labels:
    • Environment:
      tested under winXP SP2 + JDK1.5.0_07 + tomcat 5.5.17


      I have a page with 2 @PropertySelection components (A and B). An EventListener listens to onchange events on A, and changes the content of B accordingly. When caching is enabled (-Dorg.apache.tapestry.disable-caching=false), everything works as expected.
      On each onchange event, the dojo console indicates that the content of B has been updated, and that a js script registering the onchange event has been executed.

      If caching is disabled (-Dorg.apache.tapestry.disable-caching=true), the behavior is different :

      • on the first onchange event, the listener is called once as expected
      • on the second onchange event, the listener is called twice
      • on the third onchange event, the listener is called four times.
      • etc

      Having a closer look at the dojo console output, it appears that the form event registration script creates a different form event ID each time the listener is called (when caching is enabled, the form event ID remains the same). It seems that each response creates a new registration, instead of overwriting the existing one. This would explain the observed behavior.


        1. taptest.zip
          4 kB
          Christian Dutaret



            • Assignee:
              jkuhnert Jesse Kuhnert
              cdtap Christian Dutaret
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: