Tapestry
  1. Tapestry
  2. TAPESTRY-2092

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.3
    • Fix Version/s: 4.1.5
    • Component/s: Annotations, Framework
    • Labels:
      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)

      1. tap-2092.zip
        16 kB
        Andreas Andreou

        Issue Links

          Activity

          Hide
          Andreas Andreou added a comment -

          a maven project to reproduce this

          Show
          Andreas Andreou added a comment - a maven project to reproduce this

            People

            • Assignee:
              Jesse Kuhnert
              Reporter:
              Andreas Andreou
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development