I've never had to operate out of a context other than root, so I've just hardcoded it to "/mystyle.css" or whatever...
On 3/12/07, Bogdan Calmac <[EMAIL PROTECTED]> wrote:
Consider a UserDetail page that has an URL like "http://server/context/UserDetail/jdoe". Here I'm using the tapestry style of passing parameters, as part of the context. The problem here is that if you have a styleset link to "mystyle.css", it will try to look for "http"://server/context/userdetail/mystyle.css" which of course does not exit. The alternative to use the full path to the css, "/context/mystyle.css" is also bad because you don't want to hardcode the name of the context. There are 2 correct solutions to this problem which would be nice to be part of the framework: 1. Allow context information to (optionally) be passed to a page as query parameters, so the above URL would be "http://server/context/UserDetail?userid=jdoe". The relative link to the stylesheet would be fine now, but I don't know if this fits with the design of the framework. 2. Create something like an AssetLink component that takes care to prepend so context, so that: <link t:type="AssetLink" href="/mystyle.css" rel="stylesheet" type="text/css"/> would generate; <link href="/context/mystyle.css" rel="stylesheet" type="text/css"/> I would expect there were others who encountered the same quirk. How did you address it? Thank you, Bogdan Calmac. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]