Render html with Wickettester inside webapp locks page

View: New views
2 Messages — Rating Filter:   Alert me  

Render html with Wickettester inside webapp locks page

by danielroth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have used WicketTester in 1.3.X to render mail in a Link call like:

WicketTester tester = new WicketTester(new WicketTester.NonPageCachingDummyWebApplication());
tester.startPage(new Mail(someData));
String mail = tester.getServletResponse().getDocument();
sendmail(mail);
setResponsePage(...);

However, if I try this on 1.4, the page will lock and never send any response back.

Is this a bug, or just misuse? How can I get around the issue?

Thanks,

Daniel Roth

Re: Render html with Wickettester inside webapp locks page

by igor.vaynberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

imho this is a misuse. but to try and get it to work you might want to
run wickettester in a separate thread. i think it might hang because
the tester will mess with the threadlocals.

-igor

On Fri, Sep 5, 2008 at 6:15 AM, danielroth <danielc.roth@...> wrote:

>
> Hi,
>
> I have used WicketTester in 1.3.X to render mail in a Link call like:
>
> WicketTester tester = new WicketTester(new
> WicketTester.NonPageCachingDummyWebApplication());
> tester.startPage(new Mail(someData));
> String mail = tester.getServletResponse().getDocument();
> sendmail(mail);
> setResponsePage(...);
>
> However, if I try this on 1.4, the page will lock and never send any
> response back.
>
> Is this a bug, or just misuse? How can I get around the issue?
>
> Thanks,
>
> Daniel Roth
> --
> View this message in context: http://www.nabble.com/Render-html-with-Wickettester-inside-webapp-locks-page-tp19330996p19330996.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

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

LightInTheBox - Buy quality products at wholesale price!