If I recall though @Script really wants to rewrite your javascript for you on the fly and has some weird requirements (like you have to block your whole script inside a big-old CDATA area). I looked at it and couldn't find a way to make it just put out a script *exactly* as I have it in the file system (I have lots of javascript on file I've been using for years).
I eventually had to use the any component to make it work e.g. <component id="aScript" type="Any"> <static-binding name="element" value="script"/> <binding name="src" expression="assets.some_script_js"/> </component> <script jwcid="aScript" language="JavaScript" type="text/javascript"/> I really feel like there should be an option for the @Script component that just says "embed a link to this script. Don't rewrite it, don't parse it, don't muck with it, just link it." For the way I at least work, that's the 80% case. For me it's actually the 100% case as I've never shipped an app that needed to modify javascript on the fly; I just use parameterized javascript and embed parameters into the function calls on the form, a technique that hasn't failed me yet. --- Pat PS Its possible there is such an option in the Script component already, but I at least couldn't find it :). -----Original Message----- From: euphobot [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 03, 2005 9:05 AM To: Tapestry users Subject: Re: Component includes @Script is a component that does that explicitly. Robert wrote: > Hi, > > Is it possible to let a Tapestry component cause a webpage to include > an external javascript and/or css file? > So putting a component on your page will also cause a <script > src="...> and <link href="...> in the HEAD section? > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]