Yes, assets are the way to go - they solve the path issues On Tue, Mar 11, 2008 at 6:47 PM, Stroeber, Andreas <[EMAIL PROTECTED]> wrote: > OK... I found a way to do this. I would call it a "workaround" as it is not > very pretty to configure things at multiple different code locations. :-( If > anyone knows a "better" way... I am interested in that. > > Dialog.html > <link jwcid="@Style" href="asset:cssMessageDialog" rel="stylesheet" > type="text/css" media="screen" /> > > <style jwcid="@Style" media="screen"/> > > Dialog.java > @Asset("context:/css/messagedialog.css") > public abstract IAsset getCssMessageDialog(); > > Grz > andi > > > -----Ursprüngliche Nachricht----- > Von: Stroeber, Andreas > Gesendet: Dienstag, 11. März 2008 16:58 > An: Tapestry users > Betreff: AW: T4: binding stylesheets to components > > > > Yes... So far so good. > > <link jwcid="@Style" href="css/style.css" rel="stylesheet" type="text/css" > media="screen" /> <style jwcid="@Style" media="screen"/> > > Now I get some css-Link in my body. But it links to > http://localhost/css/style.css. > How to point it to http://localhost/mytapapp/app/css/style.css? > > href="context:css/style.css" doesn't work. :-( > > > > -----Ursprüngliche Nachricht----- > Von: Andreas Andreou [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 11. März 2008 13:22 > An: Tapestry users > Betreff: Re: T4: binding stylesheets to components > > you mean like the @Style and @Relation components? > http://tapestry.apache.org/tapestry4.1/components/general/style.html > http://tapestry.apache.org/tapestry4.1/components/general/relation.html > > On Tue, Mar 11, 2008 at 1:34 PM, Stroeber, Andreas <[EMAIL PROTECTED]> wrote: > > Hi there, > > > > My T4-Application uses several components. So I added a component > > MessageDialog. This component is inserted in the pages via Annotation > > > > @Component > > public abstract MessageDialog getMessageDialog(); > > > > My problem now is: > > I can add a messagedialog.css via Annotation @Asset or via <asset> in > > the .jwc-file to the component. But how to insert this css now to the > > main page? Do I really have to add this cssAsset to each page via > > @Shell? What I am looking for is something like "this component uses > > this css as default, use this for every page that references this > > component without being forced to add the css to each page seperately". > > I tried a @Shell in to component's HTML-Template but without success. > > > > I think T5 provides something like that with the @IncludeStylesheet. > > Is there something for T4? > > > > Thx > > Andi > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / > Tacos developer Open Source / JEE Consulting > > --------------------------------------------------------------------- > 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] > >
-- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]