In fact, it could be a bug. I tried to add a beaneditform component in the Start page, and I have JavaScript (for client side validation). Just put the beaneditform in the Layout.tml instead and there is no more Javascript.
Should I open a bug in JIRA? Regards ----- Message d'origine ---- De : Julien HENRY <[EMAIL PROTECTED]> À : users@tapestry.apache.org Envoyé le : Samedi, 29 Mars 2008, 15h23mn 34s Objet : [T5] How to add JavaScript in a component used in a layout Hi, I'm using a custom JAR-packaged component in a template. When I use the component directly in a page (Start.tml) I have both JavaScript and CSS file included in the HTML. But when I try to put the component in my application layout (Layout.tml), there is only the CSS file. No JavaScript. In my component, I have also the following method: @IncludeJavaScriptLibrary("${path}/component.js") @IncludeStylesheet("${path}/component.css") public class MyComponent { .... void beginRender(MarkupWriter writer) { _pageRenderSupport.addScript("setup();"); writer.cdata("Foo Bar"); } On my finale page, I have the text "Foo Bar" displayed but no <script> tag at all. Only the component.css. Can you help me to solve this problem. Thanks Julien _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Plus de moyens pour rester en contact. http://mail.yahoo.fr --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _____________________________________________________________________________ Envoyez avec Yahoo! Mail. Plus de moyens pour rester en contact. http://mail.yahoo.fr --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]