Thanks Geoff and Chris for your quick response. Much appreciated!

In fact I referenced it like this:
javaScriptSupport.require("login") because I thought the module name is a reference to the folder.

javaScriptSupport.require("login/login") works fine.

Thank you so much!
Andreas
Geoff Callender <mailto:geoff.callender.jumpst...@gmail.com>
5 Feb 2015 16:07
Or, as I prefer these days because in this style you can easily modify it to add parameters or invoke particular functions:

void afterRender() {
javaScriptSupport.require("login/login");
}

Geoff



Chris Poulsen <mailto:mailingl...@nesluop.dk>
5 Feb 2015 16:01
Modules should end up in:

<classpath>/META-INF/modules (classpath in your case being WEB-INF/classes
)

You haven't shared anything about how you attempt to reference the files so
its hard to help you.

To include the module in: WEB-INF/classes/META-INF/modules/login/login.js

You could do @Import( module = "login/login" ) in your page or in a
component on the page.

HTH

samt & sonders <mailto:kont...@samtundsonders.at>
5 Feb 2015 15:52
hi,

I'm trying to upgrade my project from 5.3.8 and running into problems using modules.
For the source directory structure I have tried:

src/main/resources/META-INF/modules/mymodule/mymodule.js AND
src/main/modules/mymodule/mymodule.js

and for the deployment directory structure I have tried this:

WEB-INF/classes/META-INF/modules/login/login.js AND
WEB-INF/classes/mymodule/mymodule.js

In both cases I get:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (login.js, line 0)
[Error] RequireJS error: scripterror: Script error for: login
http://requirejs.org/docs/errors.html#scripterror, modules login
    (anonymous function) (console.js, line 104)
    onError (console.js, line 133)
    onError (require.js, line 537)
    onScriptError (require.js, line 1681)

Thanks for your help!
Andreas







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

------------------------------------------------------------------------

Reply via email to