On Tue, Dec 4, 2012 at 10:29 AM, cknafl <chr.kn...@gmail.com> wrote: > I am currently overwriting getNamespace(). But that is really dirty. When I > make this method to return "" everytime, then my css, js and so on cannot > be > found anymore, that I added with renderHead(..). > So I implemented an if-else logic: > if(path.contains("resource") > return "wicket"; > ... >
Just return "mine" or anything that looks non-dirty to you. > > Can you tell me how you would use this > UrlRenderer#renderContextRelativeUrl() instead of setting my own > UrlRenderer > please? > class StrutsModel extends AbstractReadOnlyModel<String> { private final String relativeUrl; public StrutsModel(String relUrl) { this.relativeUrl = relUrl; } @Override public String getObject() { return RequestCycle.get().getUrlRenderer().renderContextRelativeUrl("struts/" + relativeUrl); } } class StrutsLink extends ExternalLink { public StrutsLink(String id, String strutsUrl) { super(id, new StrutsModel(strutsUrl)) } } add(new StrutsLink("linkId", "struts.html"); > > Regards > Christoph > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Wicket-and-Struts-together-have-a-problem-when-not-adding-mountpath-to-the-Wicket-Page-tp4654359p4654461.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>