wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Smet <guillaume.s...@gmail.com>
Subject Re: Link generation from outside of Wicket - was Re: [ANNOUNCE] Apache Wicket 6.7.0 Released!
Date Fri, 19 Apr 2013 16:34:13 GMT
On Fri, Apr 19, 2013 at 4:30 PM, Martin Grigorov <mgrigorov@apache.org> wrote:
> What exactly you mean by "outside of Wicket" ?
> What Wicket objects you have access to ?
> The application name will be needed and a base url. Usually the current
> request's baseUrl is used to construct a full url. Without the base url
> Wicket can generate only context-absolute url.

I'm in exactly the same situation as Martin Dietze.

I have to generate URL to a Wicket page in a batch scheduled by Spring
or Quartz.

We did it following the guidance you gave to Martin but it's quite
complicated. As you mentioned it, we have in a configuration parameter
the scheme/host/port information and we generate an URL to a wicket
page from there by getting the application by its name and building a
fake request and a fake RequestCycle.

FWIW, here is the current version of what we use:
https://gist.github.com/gsmet/5421471

-- 
Guillaume

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


Mime
View raw message