thats because you have a wicket:id there. wicket:link doesnt touch
components afaik
-igor
On Sun, Mar 30, 2008 at 8:57 PM, Matthew Young <
ginyeah@...> wrote:
> So I did this:
>
>
> <html xmlns:wicket>
> <body>
> <wicket:panel>
> <wicket:link><img wicket:id="open" src="open.png"/></wicket:link>
> </wicket:panel>
> </body>
> </html>
>
> the src attr doesn't change, it stays as "open.png" and not change to
>
> "/resources/com.mycompany.component.MyComponent/open.png"
>
>
>
> On Sun, Mar 30, 2008 at 8:37 PM, <
igor.vaynberg@...> wrote:
>
> > Use wicket:link tags around the image
> >
> > -igor
> >
> > On 3/30/08, Enrique Rodriguez <
enriquer9@...> wrote:
> > > On Sun, Mar 30, 2008 at 7:45 PM, Matthew Young <
ginyeah@...>
> > wrote:
> > > > ...
> > > > I don't want to hard code
> > > > "/resources/com.mycompany.component.MyComponent/open.png" in the
> > template
> > > > and just have <img src="open.png" .../>. Is there someway to work out
> > > the
> > > > prefix "/resources/com.mycompany.component.MyComponent/" and fix up
> > src
> > > > attribute in code?
> > >
> > > If you are in a Component you can call Component#urlFor().
> > >
> > > If not in a Component, you can call:
> > >
> > > RequestCycle.get()#urlFor();
> > >
> > > You can use the form that takes a ResourceReference for the image.
> > >
> > > HTH,
> > >
> > > Enrique
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
users-unsubscribe@...
> > > For additional commands, e-mail:
users-help@...
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
users-unsubscribe@...
> > For additional commands, e-mail:
users-help@...
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail:
users-unsubscribe@...
For additional commands, e-mail:
users-help@...