Ok, but I have a panel and I want to add an Image to the panel but when I log into my application I get the ../../.. prefix, and the ResourceReference then fails. However, once I click on any link, the prefix disappears and then my panel can find the ResourceReference. Am I misunderstanding how resource references should be used?
Thanks, Pieter On Tue, Oct 27, 2009 at 4:21 PM, Ryan McKinley <ryan...@gmail.com> wrote: > urlFor( ) uses the current request to get a relative path. If the location > you are calling urlFor() from changes, it will get a new location.... > > Note the only difference between the two urls is the ../../.. prefix > > > On Oct 27, 2009, at 11:05 AM, pieter claassen wrote: > > WHen I start my application, my urlFor() returns a different URL than when >> I >> call it a second time? >> >> ResourceReference iconref = new ResourceReference(anchorclass, >> iconname); >> System.out.println("URL: "+urlFor(iconref)); >> >> First time it returns: >> URL: >> >> ../../../resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png >> >> second time: >> URL: >> >> resources/com.musmato.wicket.pages.styles.option1.Option1StyleAnchor/document.png >> >> Any ideas? >> >> Thanks >> Pieter >> -- >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Pieter Claassen musmato.com