i meant you have to create the classes...

-igor

On Mon, Apr 19, 2010 at 4:10 PM, Ralf Eichinger
<[email protected]> wrote:
> 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: [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