Re: automatically add a js library to every page in the app

2011-05-04 Thread Clément Uster
I guess you can override the js stack core from your AppModule. public static void contributeJavaScriptStackSource(MappedConfiguration configuration) { configuration.overrideInstance(InternalConstants.CORE_STACK_NAME, YourJavaScriptStack.class); } and imple

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
Yes, that works, but now I've run into yet another issue. I need to add this library to the top of the js stack. I assumed I could do this with decorateClientInfrastructure, but ClientInfrastructure is deprecated and it is not clear how and where I can access and modify the js stack now. On Wed,

Re: automatically add a js library to every page in the app

2011-05-04 Thread Taha Hafeez
Won't this work public class Layout { @Inject private JavaScriptSupport javaScriptSupport; void afterRender(){ if(condition){ javaScriptSupport.importJavaScriptLibrary("..."); } } regards Taha On Wed, May 4, 2011 at 7:51 PM, Ray Nicholus wrote: > Sigh, that didn't work. Surely

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
Nevermind, it isn't that difficult. User error. On Wed, May 4, 2011 at 9:21 AM, Ray Nicholus wrote: > Sigh, that didn't work. Surely it can't be this difficult to add a js > library to all pages in Tapestry. I must be doing something wrong. Note > that I cannot use the import in my layouts a

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
Sigh, that didn't work. Surely it can't be this difficult to add a js library to all pages in Tapestry. I must be doing something wrong. Note that I cannot use the import in my layouts as I can only add this library conditionally. On Wed, May 4, 2011 at 9:09 AM, Ray Nicholus wrote: > n/m, I f

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
n/m, I found an example at http://tapestry.1045711.n5.nabble.com/Global-stylesheets-and-Javascripts-documentation-proposal-td2433280.html On Wed, May 4, 2011 at 9:05 AM, Ray Nicholus wrote: > I looked at the documentation for contributeMarkupRenderer, and I'm not > even sure what this is, much l

Re: automatically add a js library to every page in the app

2011-05-04 Thread Ray Nicholus
I looked at the documentation for contributeMarkupRenderer, and I'm not even sure what this is, much less what I need to do to simply add a js library to each page. Are there any useful examples that explain how to add a js library to a page in this manner? On Wed, May 4, 2011 at 8:44 AM, Taha Ha

Re: automatically add a js library to every page in the app

2011-05-04 Thread Taha Hafeez
You can add it to your layout as @Import(library = "yourlibraryname.js") public class Layout { } or You can also add it by contributing to MarkupRendererFilter regards Taha On Wed, May 4, 2011 at 7:08 PM, Ray Nicholus wrote: > Any idea how I can easily do this? Ideally, I'd like to only ma