You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Eyal Golan <eg...@gmail.com> on 2009/04/20 12:43:46 UTC

ResourceReference question

Hello,
I've been looking for an answer but couldn't find it.
We have a page that adds an image:
add(new Image("iconImage", new Model(imageResourceReference)));

The problem is with the ResourceReference.
I found only one option for the location of the image file. The location
should be next to a class so I could do something like:
        final ResourceReference resourceReference = new
ResourceReference(EntityBrowserPage.class, "img/myIcon.png");

All of our images are located under 'images' folder, which is under webapp.
Is it possible to get a ResourceReference from there.
We don't want to duplicate our images.

Thanks


Eyal Golan
egolan74@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary

Re: ResourceReference question

Posted by Eyal Golan <eg...@gmail.com>.
thanks.

(just had to add this thanks post, as I haven't been around here for a while
...)


Eyal Golan
egolan74@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Mon, Apr 20, 2009 at 7:00 PM, Igor Vaynberg <ig...@gmail.com>wrote:

> and ContextImage
>
> -igor
>
> On Mon, Apr 20, 2009 at 5:21 AM, Richard Allen
> <ri...@gmail.com> wrote:
> > I believe you want to use ContextRelativeResource. See:
> >
> http://wicket.apache.org/docs/1.4/index.html?org/apache/wicket/resource/ContextRelativeResource.html
> >
> >
> > On Mon, Apr 20, 2009 at 6:43 AM, Eyal Golan <eg...@gmail.com> wrote:
> >
> >> Hello,
> >> I've been looking for an answer but couldn't find it.
> >> We have a page that adds an image:
> >> add(new Image("iconImage", new Model(imageResourceReference)));
> >>
> >> The problem is with the ResourceReference.
> >> I found only one option for the location of the image file. The location
> >> should be next to a class so I could do something like:
> >>        final ResourceReference resourceReference = new
> >> ResourceReference(EntityBrowserPage.class, "img/myIcon.png");
> >>
> >> All of our images are located under 'images' folder, which is under
> webapp.
> >> Is it possible to get a ResourceReference from there.
> >> We don't want to duplicate our images.
> >>
> >> Thanks
> >>
> >>
> >> Eyal Golan
> >> egolan74@gmail.com
> >>
> >> Visit: http://jvdrums.sourceforge.net/
> >> LinkedIn: http://www.linkedin.com/in/egolan74
> >>
> >> P  Save a tree. Please don't print this e-mail unless it's really
> necessary
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: ResourceReference question

Posted by Igor Vaynberg <ig...@gmail.com>.
and ContextImage

-igor

On Mon, Apr 20, 2009 at 5:21 AM, Richard Allen
<ri...@gmail.com> wrote:
> I believe you want to use ContextRelativeResource. See:
> http://wicket.apache.org/docs/1.4/index.html?org/apache/wicket/resource/ContextRelativeResource.html
>
>
> On Mon, Apr 20, 2009 at 6:43 AM, Eyal Golan <eg...@gmail.com> wrote:
>
>> Hello,
>> I've been looking for an answer but couldn't find it.
>> We have a page that adds an image:
>> add(new Image("iconImage", new Model(imageResourceReference)));
>>
>> The problem is with the ResourceReference.
>> I found only one option for the location of the image file. The location
>> should be next to a class so I could do something like:
>>        final ResourceReference resourceReference = new
>> ResourceReference(EntityBrowserPage.class, "img/myIcon.png");
>>
>> All of our images are located under 'images' folder, which is under webapp.
>> Is it possible to get a ResourceReference from there.
>> We don't want to duplicate our images.
>>
>> Thanks
>>
>>
>> Eyal Golan
>> egolan74@gmail.com
>>
>> Visit: http://jvdrums.sourceforge.net/
>> LinkedIn: http://www.linkedin.com/in/egolan74
>>
>> P  Save a tree. Please don't print this e-mail unless it's really necessary
>>
>

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


Re: ResourceReference question

Posted by Richard Allen <ri...@gmail.com>.
I believe you want to use ContextRelativeResource. See:
http://wicket.apache.org/docs/1.4/index.html?org/apache/wicket/resource/ContextRelativeResource.html


On Mon, Apr 20, 2009 at 6:43 AM, Eyal Golan <eg...@gmail.com> wrote:

> Hello,
> I've been looking for an answer but couldn't find it.
> We have a page that adds an image:
> add(new Image("iconImage", new Model(imageResourceReference)));
>
> The problem is with the ResourceReference.
> I found only one option for the location of the image file. The location
> should be next to a class so I could do something like:
>        final ResourceReference resourceReference = new
> ResourceReference(EntityBrowserPage.class, "img/myIcon.png");
>
> All of our images are located under 'images' folder, which is under webapp.
> Is it possible to get a ResourceReference from there.
> We don't want to duplicate our images.
>
> Thanks
>
>
> Eyal Golan
> egolan74@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P  Save a tree. Please don't print this e-mail unless it's really necessary
>