Re: setResponsePage swallows my session feedback messages

2012-07-04 Thread Bertrand Guay-Paquet
Hi Martin, Following Andrea's comments from issue Wicket-4637, I modified the NonResettingRestartException to fix the error I reported. Here's the modified version: public class NonResettingRestartException extends ReplaceHandlerException { public NonResettingRestartException(final

Re: setResponsePage swallows my session feedback messages

2012-07-03 Thread Martin Grigorov
Hi Bertrand, On Mon, Jul 2, 2012 at 11:21 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi Martin, Thanks for your answer and code. Indeed, in my case, option 2 is most desirable because the session message is set in a completely different place than where the redirect is done.

Re: setResponsePage swallows my session feedback messages

2012-07-03 Thread Bertrand Guay-Paquet
Hi, Issues WICKET-4636 and WICKET-4637 were created. Bertrand - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: setResponsePage swallows my session feedback messages

2012-07-02 Thread Bertrand Guay-Paquet
Hi Martin, Thanks for your answer and code. Indeed, in my case, option 2 is most desirable because the session message is set in a completely different place than where the redirect is done. NonResettingRestartException works great when thrown from a page constructor. However, when thrown

Re: setResponsePage swallows my session feedback messages

2012-07-01 Thread Martin Grigorov
Hi, Here is my later response. I see two ways to solve this: 1) Use setResponsePage(pageInstance) as I described in my previous response: setMyCookie(); PageB pageB = new PageB(); pageB.info(some text); setResponsePage(pageB); This way the feedback is associated with a component (pageB) and

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Ian Marshall
Hello Bertrand, Where is your Page2 code fragment called? Is in the page constructor, in a page component onSubmit() method, or somewhere else? My guess is that your code fragment is called in the page constructor. If this is so, then: ยท I might expect the differences in behaviour you

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Bertrand Guay-Paquet
Hi Ian, Thanks for your reply. By the way, I forgot to mention I'm using Wicket 1.5.7. The (pseudo) code I wrote in my previous email is in Page2's constructor. I tried both approaches and here are the results: setResponsePage in page constructor: -Cookie not set === Cookie SET with patch

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Martin Grigorov
Hi Bertrand, I'll write a more detailed answer to your mail later. Until then you can try to workaround it by calling 'setResponsePage()' in #onBeforeRender() instead. On Fri, Jun 29, 2012 at 4:21 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Hi Ian, Thanks for your reply. By the

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Ian Marshall
Hi Bertrand, If you use and then one of in your Page2 constructor you should be able to pass (your cookie?) data to your Page1, and you will see by trial and error whether your flash message makes it to Page1 or not. Regards, Ian Bertrand Guay-Paquet wrote Hi Ian, Thanks for your

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Bertrand Guay-Paquet
Hi Ian, I'm sorry, I don't understand. Perhaps some parts of your message didn't make it to the mailing list? (see If you use and and then one of). On 29/06/2012 9:39 AM, Ian Marshall wrote: Hi Bertrand, If you use and then one of in your Page2 constructor you should be able to pass (your

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Bertrand Guay-Paquet
Hi Martin, This doesn't seem to fix the issue. The flash messages are not carried over to Page1 and the cookie is not set in the 302 to Page1. I did it like this: private boolean doRedirect; Page2(Parameters) { if( whatever ) { doRedirect = true; } } @Override protected

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Ian Marshall
Sorry, raw HTML tag content did not make it to the E-mail I meant: If you use Session.get().info(blah); and then one of throw new RestartResponseException(Page1.class, PageParameters params); throw new RestartResponseException(new Page1(...)); in your Page2 constructor you should

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Bertrand Guay-Paquet
Ok now I understand! What you suggest is more or less what I mentioned in the first email. RestartResponseException does indeed halt rendering of Page2 which causes the flash message to be displayed on Page1. I guess I could find a way to pass as page parameters of Page1 the cookie and set it

Re: setResponsePage swallows my session feedback messages

2012-06-29 Thread Martin Grigorov
Another way to solve this is to use: setCookie(); PageB pageb = new PageB(); pageB.info(something); setResponsePage(pageb) On Fri, Jun 29, 2012 at 5:25 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: Ok now I understand! What you suggest is more or less what I mentioned in the first