You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by samt & sonders <ko...@samtundsonders.at> on 2015/02/05 09:52:25 UTC

Tapestry 5.4 Beta 22: Supposed directory structure for modules used by requirejs

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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.4 Beta 22: Supposed directory structure for modules used by requirejs

Posted by samt & sonders <ko...@samtundsonders.at>.
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 <ma...@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 <ma...@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 <ma...@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-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
> ------------------------------------------------------------------------


Re: Tapestry 5.4 Beta 22: Supposed directory structure for modules used by requirejs

Posted by Geoff Callender <ge...@gmail.com>.
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

On 5 Feb 2015, at 8:01 pm, Chris Poulsen <ma...@nesluop.dk> wrote:

> 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
> 
> -- 
> Chris
> 
> 
> On Thu, Feb 5, 2015 at 9:52 AM, samt & sonders <ko...@samtundsonders.at>
> wrote:
> 
>> 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-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 


Re: Tapestry 5.4 Beta 22: Supposed directory structure for modules used by requirejs

Posted by Chris Poulsen <ma...@nesluop.dk>.
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

-- 
Chris


On Thu, Feb 5, 2015 at 9:52 AM, samt & sonders <ko...@samtundsonders.at>
wrote:

> 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-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>