Hi All,

I've had success using the TextTemplateHeaderContributor.forJavaScript
method but can't get the equivalent TextTemplateHeaderContributor.forCss
method to work. Here are some snippets:

>From CSS:
.someClass {
        background: #fff url('${brand}/someImage.jpg') 100% 100% no-repeat;
}

>From Java:
IModel skinModel = new AbstractReadOnlyModel() {
        private static final long serialVersionUID = 1L;
        @Override
        public Map getObject() {
                Map<String, CharSequence> variables =
                        new HashMap<String, CharSequence>(1);
                variables.put("brand", getStyle());
                return variables;
        }
};
add(TextTemplateHeaderContributor.forCss(
        MyApplication.class, "skins/style.css", skinModel));

The problem is that the substitution seems to fail and the someImage.jpg
file is not drawn. Any ideas on what I am doing wrong?

Thanks,
Steve
-- 
View this message in context: 
http://www.nabble.com/How-to-use-TextTemplateHeaderContributor.forCss-method--tp20411565p20411565.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to