Re: [T5] Head Script Injection

2007-07-17 Thread David Avenante
To have a better controle on script you can implement like me your own DocumentScriptBuilderImpl And override the existing with this code in your app module : public PageRenderInitializer buildMyPageRenderInitializer(final List configuration,

Re: [T5] Head Script Injection

2007-07-17 Thread Todd Orr
Thanks! These both work, sort of. The renderSupport puts the script tag in the body tag (5.0.5). So, its not a huge improvement. While the more manual solution of adding the element works well enough, neither of these solutions easily allow arbitrary blocks to be inserted. I think this would be th

Re: [T5] Head Script Injection

2007-07-17 Thread David Avenante
I think something like that work : @Environmental private PageRenderSupport renderSupport; @Inject @Path("myScript.js") private Asset myScript; renderSupport.addScriptLink(myScript); - To unsubscribe, e-mail: [EMA

Re: [T5] Head Script Injection

2007-07-17 Thread Siddhartha Argollo
Hi, You could do something like this (on a render method): Element head = writer.getDocument().find("html/head"); head.elementAt(0, "link", "rel", "stylesheet", "type", "text/css", "href", this.defaultCss.toClientURL()); In this case I'm inserting a CSS link. Todd Orr wrote: Is

[T5] Head Script Injection

2007-07-17 Thread Todd Orr
Is there any way to inject a script tag (via a block) defined in a nested component into the page's head section? I'm trying to create a component that utilizes some specific js, but I find that including the js at the point in the page where the component is rendered hacky. I think that this wou