You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Wayne Pope <wa...@googlemail.com> on 2009/03/06 17:03:44 UTC

Using RequestCycle outside of a http request

Hi,

We have some Bookmarkable pages that display some given content. I
would like to email these links out to a set of users. We have a set
of classes that knows how to build the good bookmarkable link
depending on the content. Now this works all fine and good.

However we need to move the email sending aspect to a batch/thread
(for daily updates). I would like create the bookmarkable link the
same way and call toString() to get the good URL. However I get an
exception about not running inside a request/application.

Is it possible to create a new RequestCycle outside of a request (it
doesn't appear so) or is there any other way of creating the link
aside from hand coding/crafting them?

thanks for any pointers
Wayne








www.glasscubes.com

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


Re: Using RequestCycle outside of a http request

Posted by Wayne Pope <wa...@googlemail.com>.
ok thanks Jeremy

On Fri, Mar 6, 2009 at 5:28 PM, Jeremy Thomerson
<je...@wickettraining.com> wrote:
> Search the mail list - there's a lot of examples of this.  Basically, you'll
> need to use WicketTester - it will set up a mock request cycle, etc. for
> you.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
> On Fri, Mar 6, 2009 at 10:03 AM, Wayne Pope <
> waynemailinglists@googlemail.com> wrote:
>
>> Hi,
>>
>> We have some Bookmarkable pages that display some given content. I
>> would like to email these links out to a set of users. We have a set
>> of classes that knows how to build the good bookmarkable link
>> depending on the content. Now this works all fine and good.
>>
>> However we need to move the email sending aspect to a batch/thread
>> (for daily updates). I would like create the bookmarkable link the
>> same way and call toString() to get the good URL. However I get an
>> exception about not running inside a request/application.
>>
>> Is it possible to create a new RequestCycle outside of a request (it
>> doesn't appear so) or is there any other way of creating the link
>> aside from hand coding/crafting them?
>>
>> thanks for any pointers
>> Wayne
>>
>>
>>
>>
>>
>>
>>
>>
>> www.glasscubes.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

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


Re: Using RequestCycle outside of a http request

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Search the mail list - there's a lot of examples of this.  Basically, you'll
need to use WicketTester - it will set up a mock request cycle, etc. for
you.

-- 
Jeremy Thomerson
http://www.wickettraining.com

On Fri, Mar 6, 2009 at 10:03 AM, Wayne Pope <
waynemailinglists@googlemail.com> wrote:

> Hi,
>
> We have some Bookmarkable pages that display some given content. I
> would like to email these links out to a set of users. We have a set
> of classes that knows how to build the good bookmarkable link
> depending on the content. Now this works all fine and good.
>
> However we need to move the email sending aspect to a batch/thread
> (for daily updates). I would like create the bookmarkable link the
> same way and call toString() to get the good URL. However I get an
> exception about not running inside a request/application.
>
> Is it possible to create a new RequestCycle outside of a request (it
> doesn't appear so) or is there any other way of creating the link
> aside from hand coding/crafting them?
>
> thanks for any pointers
> Wayne
>
>
>
>
>
>
>
>
> www.glasscubes.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>