See chapter 7 "Under the hood of request processing" and 8 "Wicket Links
and URL generation" of the Wicket User Guide at:
http://wicket.apache.org/learn/books/freeguide.html
~ Thank you,
    Paul Bors
On Thu, May 2, 2013 at 12:59 AM, Don Ferguson <don.fergu...@gmail.com>wrote:

> I'm using something like the following (in 6.7.0):
>
> String url2 = RequestCycle.get().getUrlRenderer()
> .renderFullUrl( Url.parse(urlFor(Page.class, newPps).toString()));
>
>
>
>
> On Wednesday, May 1, 2013 at 9:26 PM, Bertrand Guay-Paquet wrote:
>
> > Hi,
> >
> > On 01/05/2013 10:57 PM, smallufo wrote:
> > > String url2 = RequestUtils.toAbsolutePath(urlFor(Page.class ,
> > > newPps).toString() , "");
> > > System.out.println("url2 = " + url2); // full in 1.4 , but relative in
> 6.0
> > >
> >
> > The Javadoc says "Calculates absolute path to url relative to another
> > absolute url." so that's expected.
> > > It means , if I need to get full url (including host / context-path) ,
> I
> > > have to write :
> > > *String fullUrl =
> > >
> getRequestCycle().getUrlRenderer().renderFullUrl(Url.parse(getRequestCycle().urlFor(new
> > > RenderPageRequestHandler(new PageProvider(Page.class , newPps)))));*
> > >
> > > It is so lengthy and cumbersome . Is there any shortcut for this ?
> > That's what I use, but I wrapped it in a public static util method
> > somewhere...
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org (mailto:
> users-unsubscr...@wicket.apache.org)
> > For additional commands, e-mail: users-h...@wicket.apache.org (mailto:
> users-h...@wicket.apache.org)
> >
> >
>
>
>

Reply via email to