You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dirk Forchel <di...@exedio.com> on 2014/08/20 09:58:57 UTC

Re: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

Hi Ernesto,
after a couple of weeks (months) I still haven't found a solution. Any idea?
Thanks for your helping hand.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4667100.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

Posted by Dirk Forchel <di...@exedio.com>.
Thank you Martin. Lovely.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4667115.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Struggling with ContextRelativeResource, RenderedDynamicImageResource and SharedResources

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

With the following modifications it works:

in HomePage.html:

<span>static resource from Web Container</span>
 <img class="icon" src="images/dotclear.png" /><br>
<span>ContextRelativeResource with SharedResourceReference</span>
 <img class="icon" wicket:id="dotclear1" /><br>
<span>PlaceholderImageResourceReference</span>
 <img class="icon" wicket:id="dotclear2" />

in HomePage.java:

add(new Image("dotclear1", new SharedResourceReference("dotclear")));
 add(new Image("dotclear2", new PlaceholderImageResourceReference()));

the generated paths look like:
http://localhost:8080/en_US/images/dotclear1-ver-1383895720000.png
note the locale as first segment in the path! with your code this is
missing and thus the 404s


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Wed, Aug 20, 2014 at 10:58 AM, Dirk Forchel <di...@exedio.com>
wrote:

> Hi Ernesto,
> after a couple of weeks (months) I still haven't found a solution. Any
> idea?
> Thanks for your helping hand.
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Struggling-with-ContextRelativeResource-RenderedDynamicImageResource-and-SharedResources-tp4662190p4667100.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>