We do something similar; you can have your @Border *always* pull in a
single stylesheet that has a single line:
@import ("http://your.style.server/blah.css")
You host blah.css off Apache (or Tomcat, or whatever) outside of the
context of your webapp and change at will. You can use nested @imports
(e.g., blah.css is maybe just a collection of @imports as well).
HTH,
Tom
-----Original Message-----
From: Srinivas Yermal [mailto:[EMAIL PROTECTED]
Sent: Monday, November 27, 2006 8:57 AM
To: Tapestry users
Subject: @Asset problem
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.
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). 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.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]