Here is another piece of information I had to figure out before the above
worked for me: the META-INF folder needs to be under /src/main/resources
(not /src/main/webapp).
--
View this message in context:
http://tapestry-users.832.n2.nabble.com/5-4-Javascript-best-practices-tp7584721p7587037.htm
I've just noticed that @Import now has a "module" parameter, that can
be used for modules & methods that take no parameters.
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h.
Yup. That's right.
On 28 January 2013 00:00, Lance Java wrote:
> Thanks Steve, I've lost a few hours trying to figure this out.
>
> So I only need to contribute to ModuleManager if I don't follow the
> convention? (ie module "foo" is located at "/META-INF/modules/foo.js").
>
>
>
> --
> View this
Thanks Steve, I've lost a few hours trying to figure this out.
So I only need to contribute to ModuleManager if I don't follow the
convention? (ie module "foo" is located at "/META-INF/modules/foo.js").
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/5-4-Javascript-best
My last email assumes your RequireJS modules live in the
/META-INF/modules/ dir and follow the same naming convention. If
that's not the case then you can 'Alias' your module.
define(["highcharts"], function(highcharts) { ... }
If 'highcharts' lives elsewhere I can re-route the call to
"/META-INF
Good questions - I had to work this out myself when moving to T5.4!
Yes, I personally consider @Import'ing JS deprecated - though it is
still valid if you don't wish to use RequireJS.
In your component put:
JSONObject params = new JSONObject();
jsSupport.require("alienfactory/stuff").with(params
I'm using the new 5.4-alpha-2 and I'm not 100% sure how I should be managing
my javascript. I'm a require.js newbie and I've got a few questions:
1. Are @Import(library=x) and JavascriptSupport.importJavaScriptLibrary(x)
now considered deprecated or are there still valid use cases?
2. What would