2014-02-04 Thiago H de Paula Figueiredo <thiag...@gmail.com>:
> How would JavaScript files be included by pages and components? Do you have
> any suggestion on how a JavaScriptSupport-less Tapestry would work in
> relation to JavaScript? I'm sorry, I just cannot see how (nor why).

Easy, just the way require.js works :)

// MyComp.java
@Import(library = "MyComp.js")
public class MyComp {
}
// MyComp.js
require( ['t5/core/console"], function( console ) {
  console.log('lala');
});

If you need any data in your script, then just add the stuff to your
DOM, e.g. with "data-" attributes or hidden fields.

See http://www.requirejs.org/docs/start.html - there's no example with
inline JS.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to