Re: T5 Repeated injections

2007-05-16 Thread Howard Lewis Ship
@Inject @Path("context:css/mystyles.css") private Asset _stylesheet; You can put a "context:" prefix on a path to say its relative to the context root. You still get the benefits of localization support (if you have localized variants of mystyles.css). On 5/16/07, Bill Holloway <[EMAIL PROTECT

Re: T5 Repeated injections

2007-05-16 Thread Bill Holloway
Thanks, Marcus, I'm using Maven and would like to keep the file under src/main/resources/com/.../components to simplify the injection. Bill On 5/16/07, Marcus <[EMAIL PROTECTED]> wrote: Hi Bill, If this css file name never change, perhaps this help: in Layout.html: with mystyles.css

Re: T5 Repeated injections

2007-05-16 Thread Marcus
Hi Bill, If this css file name never change, perhaps this help: in Layout.html: with mystyles.css under src/main/webapp/assets/css/ Marcus

Re: T5 Repeated injections

2007-05-16 Thread Howard Lewis Ship
Yes, you can use the template as a way to accomplish composition, rather than relying on inheritance. Still, I think a common idiom is to define a base class for all pages in an application that defines common resources (such as these assets), with protected or public accessor methods. On 5/16/0

Re: T5 Repeated injections

2007-05-16 Thread Bill Holloway
Well, I just finished building and inserting the "" component into the five page templates, and it was pretty dang easy. Nevermind. On 5/16/07, Bill Holloway <[EMAIL PROTECTED]> wrote: I have several tapestry pages that all receive an injection of the exact same asset for use on the HTML page a

T5 Repeated injections

2007-05-16 Thread Bill Holloway
I have several tapestry pages that all receive an injection of the exact same asset for use on the HTML page as a stylesheet link href: @Inject ("menu.css") private Asset _menuCss public Asset getMenuCss () { return _menuCss; } I would love to be able to encapsulate this bit of code, ideally