Your example may work, but it's not what I'm looking for because the <link> tag is hard coded in the TML.
I want to decide dynamically whether to add the <link> tags (using RenderSupport). And if so css files selected based on request params and added as <link> tags. These css files are located outside of my server on a CDN (akamai). As for URIAssetFactory in chenille kit, I have not been able to find an example of its usage. Can any one provide a brief example of where to include the URI Asset Factory and how to use it in the asset declaration? Is it contributed in AppModule, etc? ----- Original Message ---- From: Geoff Callender <geoff.callender.jumpst...@gmail.com> To: Tapestry users <users@tapestry.apache.org> Sent: Wednesday, February 4, 2009 9:48:06 AM Subject: Re: Dynamic Variables in Asset declarations Assuming you know how to generate the path to each of your 50 assets, can you do the following (untested)? public String getStylesheetPath() { ... figure out the path (relative to the web context, eg. css/ skin01.css), and then return this... return "asset:context:" + path; } and in the html: <link rel="stylesheet" type="text/css" href="${stylesheetPath}"/> Ideally I'd have tested this before posting it , but no chance today... Cheers, geoff On 31/01/2009, at 2:36 AM, Dave Greggory wrote: > Yep, I'm trying to have a dynamic URL for my CSS (not dynamic > content). I'll checkout chenillekit, thanks for the suggestion. > > > > ----- Original Message ---- > From: Sven Homburg <hombu...@googlemail.com> > To: Tapestry users <users@tapestry.apache.org> > Sent: Friday, January 30, 2009 7:00:22 AM > Subject: Re: Dynamic Variables in Asset declarations > > The URIAssetFactory is located in the chenillekit-core module > > 2009/1/30 Massimo Lusetti <mluse...@gmail.com> > >> On Fri, Jan 30, 2009 at 12:19 PM, Thiago H. de Paula Figueiredo >> <thiag...@gmail.com> wrote: >> >>> I think Dave is trying to have an asset URL defined dinamically, not >>> its content . . . For dynamic content, I would use StreamResponse >>> too. >>> ;) >> >> Look in the chenillkit project, there's an implementation of >> AssetFactory based on an URL or maybe URI, it could give you ideas. >> >> -- >> Massimo >> http://meridio.blogspot.com >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > -- > with regards > Sven Homburg > http://www.chenillekit.org > http://tapestry5-components.googlecode.com > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org