Re: Call urlFor(Class, PageParams) outside of request cycle
Hi Alex Swan, I know the post is a bit old now. I had a similar problem a couple of months ago and the way I got around it is by creating a non bookmarkable link at same time I created the main object via the wicket app and I stored it on the DB. Quartz then I would fetch the stored link from the DB and send the email with that link. The reason I did it that way was because at the time I wanted to have a non bookmarkable link with encoded url to hide the parameters I was passing. Cheers, Lucas -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Call-urlFor-Class-PageParams-outside-of-request-cycle-tp3392690p3764774.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Call urlFor(Class, PageParams) outside of request cycle
Thanks. I ended up constructing the URL manually as you suggested. On Mon, Mar 21, 2011 at 1:29 AM, Wilhelmsen Tor Iver wrote: >> We have a Quartz thread which periodically sends emails with a link to >> a Wicket page. Calling RequestCycle.get().urlFor(Class, >> PageParameters) doesn't work because the thread is not a part of >> Wicket request cycle. Is there a way to ask Wicket to generate the URL >> in this case? > > What you really want is to use a bookmarkable page mounted in the > application, and create a URL string with the necessary parameters in the > Quartz job. > > Or create a simple Wicket servlet that generates it for you, which you then > call from the job using e.g. a standard URLConnection. > > - Tor Iver > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Call urlFor(Class, PageParams) outside of request cycle
> We have a Quartz thread which periodically sends emails with a link to > a Wicket page. Calling RequestCycle.get().urlFor(Class, > PageParameters) doesn't work because the thread is not a part of > Wicket request cycle. Is there a way to ask Wicket to generate the URL > in this case? What you really want is to use a bookmarkable page mounted in the application, and create a URL string with the necessary parameters in the Quartz job. Or create a simple Wicket servlet that generates it for you, which you then call from the job using e.g. a standard URLConnection. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Call urlFor(Class, PageParams) outside of request cycle
Hello, We have a Quartz thread which periodically sends emails with a link to a Wicket page. Calling RequestCycle.get().urlFor(Class, PageParameters) doesn't work because the thread is not a part of Wicket request cycle. Is there a way to ask Wicket to generate the URL in this case? Thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org