Re: Correct way to JS in tapestry 5.4

2014-06-17 Thread Thiago H de Paula Figueiredo
On Mon, 16 Jun 2014 20:01:48 -0300, Sanket Sharma wrote: javaScriptSupport.require("openstreetmaps").invoke("registerAddressChangeListener").with(clientElement.getClientId()); I'do do this instead: javaScriptSupport.require("openstreetmaps").with(clientElement.getClientId()); define('ope

Re: Correct way to JS in tapestry 5.4

2014-06-16 Thread Geoff Callender
Are you sure openLayers isn't available in registerAddressChangeListener? I don't think you need to use require in there. Aside from that, I would lean toward a different structure: - A component, say MyMap, which you put wherever you want the map to be. It would have a corresponding js, say my

Re: Correct way to JS in tapestry 5.4

2014-06-16 Thread Sanket Sharma
Thats odd. I've been noticing my emails to the list appear after a delay - not sure whats causing it. And now the code disappears! But thanks for your help. Anyways, in the meantime I already started playing with modules and require.js and got it to work. I have a few questions though. I'm not a g

Re: Correct way to JS in tapestry 5.4

2014-06-16 Thread Thiago H de Paula Figueiredo
On Sun, 15 Jun 2014 21:35:34 -0300, Sanket Sharma wrote: Hi, Hi! Now, in my application I have a open street map control that needs to be updated when a selection/text changes on the form. I was wondering what is the best way to do it in T5.4? I can potentially create a Mixin as descri

Correct way to JS in tapestry 5.4

2014-06-15 Thread Sanket Sharma
Hi, I've been reading through the JavaScript changes in tapestry 5.4 and the use AMD in particular. I was able to load my custom module and other libraries as described in documentation here : http://tapestry.apache.org/client-side-javascript.html and here: http://tapestry.apache.org/javascript-mo