You could implement http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestry/IAsset.html esp. the buildURL method and make it work the way you like
You could also spare creating assets for css, and include them in your Border the html way... If you're on 4.1.x versions, this component is helpful http://tapestry.apache.org/tapestry4.1/components/general/style.html Srinivas Yermal wrote: > Hi, > > I am now a big fan of tapestry annotations since everything stays > neatly in > one place, except in one area which still bothers me. I want to specify > assets like stylesheets and such in a Border component that can be > used by > the rest of the pages and the whole app looks uniform and so on and so > forth. > > But I also want to be able to change the stylesheet name at deploy time, > without having to recompile and redistribute the war file, in other words > bother the developers whenever I want to change it. So I thought may be I > can declare it as a key (stylesheet = css/mycss.css) in the > app.propertiesfile and pick it up in Border component. > > @Asset("message:stylesheet") - This isnt working. I dont know whether its > supposed to. No, it's not supposed to work this way > > I went ahead and tried this - > public IAsset getStylesheet() { > return getAsset(getMessages().getMessage("stylesheet")); > } > > However this code always returns null. I guess the asset needs to be > registered much ahead, (there is some code I see in AbstractComponent > which > uses a map to store references of assets). You're right here... > So how am I supposed to setup > dynamic assets? Is there a way of creating assets when required? I > remember > having read something about this but I am unable to find it. I would be > grateful if you could point me in the right direction. > > Thanks, > Srini. > -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]