java - Scope prepended to name when rendering JavaScriptResourceReference in Wicket 7.0.0-M6 -
in panel supposed loading js resource, add behavior following method panel:
@override public void renderhead(component component, iheaderresponse response){ response.render(javascriptheaderitem.forreference(new javascriptresourcereference(relativeclass, webapplication.get().getservletcontext().getcontextpath() + jsref))); }
i can see stepping through in debug name parameter context path prepended url of resource, want! when website run, panel looks @ localhost:8080/context/scopeurl/context/resourceurl
instead of localhost:8080/context/resourceurl
. scope can't set null, have use name parameter access resource properly?
classes kept in separate directory structure within root directory scripts trying load, otherwise wouldn't such problem. answers work wicket 6.x should work version, think.
javascriptresourcereference uses class "relativeclass" scope , encodes in url.
you need use contextrelativeresourcereference(jsref)
Comments
Post a Comment