Hi all,

I would like to call a certain JS method in the #renderHead method based on 
whether a cookie is set:

I am getting a Last cause: org.apache.wicket.response.StringResponse cannot be 
cast to org.apache.wicket.request.http.WebResponse exception.
Is it still possible to do this in the #renderHead method?

if (cookie == null) {
        response.render(OnDomReadyHeaderItem.forScript("show();"));
            cookieUtils.save(key, value);
} else {
        response.render(OnDomReadyHeaderItem.forScript("hide();"));
}

Thanks, Chris

Reply via email to