May help:
http://javathoughts.capesugarbird.com/2007/08/branding-wicket-application-take-2.html

On Tue, Sep 29, 2009 at 2:03 AM, pete swulius <pswul...@gmail.com> wrote:

> All,
>
> I am trying to use an AttributeModifier to change the stylesheet used on a
> Page of mine.
>
> WebComponent styleComponent = new WebComponent( "style" );
> styleComponent.add( new SimpleAttributeModifier( "href", "css/" +
> style.getName() + "/stylesheet.css" ) );
> add( styleComponent );
>
> The different stylesheets are located in sub-directories corresponding to
> style.getName().  The problem I have is that whatever code prepends all
> relative paths on the rendered page is not applying it to this 'modified
> attribute'.  For instance:
>
> I see this
> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
> render as
> <link rel="shortcut icon" type="image/x-icon" href="../../favicon.ico">
>
> but my modified style just renders as such:
> <link wicket:id="style" rel="stylesheet" type="text/css"
> href="css/foobar/stylesheet.css"/>
>
> Obviously this relative path swipe happens before the attributes are
> modified.  Is there a better way to do what I'm trying to do?  Thank you!
>
> --pete
>



-- 
Pedro Henrique Oliveira dos Santos

Reply via email to