Maybe is easier than this.....try to override method newResource in TextTemplateResourceReference like this:

@Override
    protected Resource newResource()
    {
        return new Resource()
        {
            private static final long serialVersionUID = 1L;

            @Override
            public IResourceStream getResourceStream()
            {
textTemplate = new PackagedTextTemplate(getScope(), getName());

final String stringValue = textTemplate.asString(variablesModel.getObject()); variablesModel.detach(); // We're done with the model so detach it! return new StringResourceStream(stringValue, textTemplate.getContentType());
            }
        };
    }

Essentially this code create a new PackagedTextTemplate each time the resource is needed and should reload css file.

It's too bad it's not as simple as
       if
(Application.get().getConfigurationType().equalsIgnoreCase("development"))
       {
         invalidate();
       }
It isn't clear to me how I might go about that but It would need to run in
something like onAfterRender()?


Andrea Del Bene wrote:
Well...is a little bit complicated but you  should call
ResourceReference's invalidate() after your pages have been rendered.
But I don't know how you should put this method call.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CSS-Change-not-being-picked-up-when-using-TextTemplateResourceReference-tp3613064p3617675.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
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]

Reply via email to