I have a CSS that refers to an image -
span hello{
float:left;
background:#DAE0D2 url("test.gif") repeat-x bottom;
}
If I were to package the panel as a component, the gif needs to be packaged as well. Then the CSS reference
to image -
url("test.gif")
cannot be hardcoded.
So changed the css to
span hello{
float:left;
background:#DAE0D2 url("${
test.gif}") repeat-x bottom;
}
Created wicket.extensions.util.resource.CssTemplate similar to _javascript_Template
Added factory methods to wicket.extensions.util.resource.TextTemplateHeaderContributor for creating CssTemplate.
Then supplied a map that gets the URL for the packagedreference (images)
I did end up with <style> blah blah </style> when rendering. Is there a way of avoiding this (i mean get the variable intepolation done and refer to the resource/css instead)
-- karthik --
- [Wicket-user] image ref within CSS karthik Guru
- Re: [Wicket-user] image ref within CSS Eelco Hillenius
- Re: [Wicket-user] image ref within CSS karthik Guru
- Re: [Wicket-user] image ref within CSS Eelco Hillenius
- Re: [Wicket-user] image ref within CSS Igor Vaynberg
- Re: [Wicket-user] image ref within C... Justin Lee
