Am Montag, den 19.04.2010, 09:08 -0700 schrieb Igor Vaynberg: > you will have to create a TextTemplateResource to serve such resources > and a TextTemplateResourceReference to create urls for them. > > -igor
as there are no TextTemplateResource and TextTemplateResourceReference classes in Wicket 1.4.7, I tried this: PackagedTextTemplate jsTemplate = new PackagedTextTemplate(this.getClass(), "js/lightbox.js"); TextTemplateSharedResourceFactory ttsr = new TextTemplateSharedResourceFactory(jsTemplate, this.getClass()); String webappContext = WebApplication.get().getServletContext() .getContextPath(); Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("webappContext", webappContext); TextTemplateLink ref = new TextTemplateLink("lightbox", ttsr, parameters); add(ref); and in panels html: <wicket:head> <script wicket:id="lightbox" src="#" language="JavaScript"></script> </wicket:head> this resulted in a rendered URL (that looks weired): <script wicket:id="lightbox" src="resources/LightBox2Panel/%2fnetcms" language="JavaScript"></script> And this link returns a 404 error... So what's wrong? --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org