Tapestry
  1. Tapestry
  2. TAPESTRY-1398

@EventListener in any component doesn't get called

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Tapestry 4.1.1 (can't use 4.1.2-SNAPSHOT becouse of OGNL-16), Tacos 4.1.0-SNAPSHOT, OGNL 2.6.9

      Description

      Annotation @EventListener doesn't emmit javascript neccesary to trigger a method on the server if specified in a component (like Border).

      This doesn't get called becouse there is no javascript to make a dojo ajax call.

          1. Border.java ###
            @EventListener(elements = "tab1", events = "onclick")
            public void tab1Clicked() { logger.info("tab1 clicked"); }
          1. Border.html ###
            <div id="myTabContainer">
            <div id="tab1">
            <div id="treeArea">
            <div jwcid="tree" id="tree" style="overflow: auto; width: auto; height: auto;">
            <a jwcid="nodeLink" href="folder.png">
            <img jwcid="icon" align="absbottom"/>
            <span jwcid="nodeLabel">Node 1</span>
            </a>
            </div>
            </div>
            </div>
            <div id="tab2">
            <h3>This is tab 2.</h3>
            </div>
            </div>

      If a listener method is moved to an enclosing page (like Home), then it works - but it is not very nice to have the method anywhere but in a component.

        Activity

        Hide
        Jesse Kuhnert added a comment -

        Nope....Just tested this out and it's working fine for me in 4.1.2.

        Show
        Jesse Kuhnert added a comment - Nope....Just tested this out and it's working fine for me in 4.1.2.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Borut Bolcina
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development