My web apps have a layout of
context
|-- Home.html
|-- WEB-INF
| |-- app.application
| `-- Echo.html
`-- css
`-- style.css
Echo.html is the template for a component which gets included in Home.html. If I include <link
jwcid="@Style" href="css/style.css" rel="stylesheet" type="text/css" media="screen" /> anywhere
inside $content$ of Echo's template and call Home.html, <link rel="stylesheet" type="text/css"
media="screen" href="css/style.css" /> gets rendered inside the <head> block. This gets interpreted
as relative to Home.html's location so if my app resides at http://localhost:8080/testapp/ and I
call Home.html with http://localhost:8080/testapp/Home.html (when using pretty URLs, otherwise
something like app?service=page&page=Home) my style sheet will be searched in
http://localhost:8080/testapp/css/style.css which is absolutely correct. This is not working when
including the same component on pages in subdirectories though for obvious reasons...
Uli
P.S.: I'll probably be in FTH W monday and tuesday next week, so if you want to exchange some
thoughts write me an email (officially I'm on holiday right now :-))
Stroeber, Andreas schrieb:
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]