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

EventListener in components that get included more than once in a page aren't triggered

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.1.3
    • 4.1.5
    • Annotations, Framework
    • None

    Description

      In a simple component (@Selector) that has a PropertySelection (named data) and this:

      @EventListener(targets="data", events="onchange")
      public void doSelect()

      { System.out.println("Selected: " + getValue()); }

      and in a page that includes this let's say 3 times:

      <form jwcid="@Form">
      <span jwcid="@Selector"/>
      <span jwcid="@Selector"/>
      <span jwcid="@Selector"/>
      </form>

      Only the first selector triggers its listener + i dont see javascript that would bind the onchange event of the other ones.

      Is this something trivial to fix?
      Is this a known limitation of the EventListener annotation?
      Would an EventListener component make things easier in such cases?

      (btw, TAPESTRY-2070 could be similar)

      Attachments

        1. tap-2092.zip
          16 kB
          Andreas Andreou

        Issue Links

          Activity

            People

              jkuhnert Jesse Kuhnert
              andyhot Andreas Andreou
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: