See my working demo above in this thread: (https://github.com/sveine/tapestry-multi-module-demo/blob/master/module1-root/module1/src/main/resources/META-INF/modules/publisheventdemo.js)
From: Thiago H de Paula Figueiredo [via Apache Tapestry Mailing List Archives] [mailto:[email protected]] Sent: 27. april 2017 14:11 To: Svein-Erik Løken <[email protected]> Subject: Re: [Announcement] New feature for Tapestry 5.4.2 and 5.5: easily call event handler methods from JavaScript On Thu, Apr 27, 2017 at 6:43 AM, abangkis <[hidden email]</user/SendEmail.jtp?type=node&node=5733456&i=0>> wrote: > Hi. Thanks for the awesome improvement. I want to adopt it immediately. Hi! Nice! :) > But I've stumbled to one problem. How do I pass a parameter to the event? > You don't pass it to the event, but to the t5/core/ajax() function. Check the data property of the options parameter in https://tapestry.apache.org/current/coffeescript/ajax.html. Basically, you pass an object with the key/value pairs you want passed as parameters: ajax('answer', { element: $('#result'), /* Here it goes */ data: { queryParameter1: valueParameter1, queryParameter2: valueParameter2 } /* Here it ends */ success: function(response) { $('#result').text(response.json.origin); } }); -- Thiago ________________________________ If you reply to this email, your message will be added to the discussion below: http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Announcement-New-feature-for-Tapestry-5-4-2-and-5-5-easily-call-event-handler-methods-from-JavaScript-tp5733295p5733456.html To unsubscribe from [email protected]<mailto:[email protected]> Mailing List Archives, click here<http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2375125&code=c3ZlaW5AamFjaWxsYS5ub3wyMzc1MTI1fC0xNTM4NzY2ODg4>. NAML<http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
