Re: How to handle errors in RequestCycle.onEndRequest

2011-10-16 Thread Christian Huber
Sorry, took a while until I got time to test the changes. WIth the current trunk revision I now can use restart exceptons within onRequestHandlerExecuted to force a redirect to an error page and even adding feedback messages seems to work properly. Thank you very much for this fix! :-) The

Re: How to handle errors in RequestCycle.onEndRequest

2011-10-12 Thread Igor Vaynberg
ive just checked in a couple of tweaks, give it a go... -igor On Sat, Oct 1, 2011 at 10:38 AM, Christian Huber hub...@butterbrot.org wrote: Hi Igor, I just saw you answered to my JIRA issue. I had tried your suggestion about throwing an exception before but to no avail (see also my comment

Re: How to handle errors in RequestCycle.onEndRequest

2011-10-01 Thread Christian Huber
Hi again, unfortunately my problem still persists. After migrating to 1.5.1 and putting my commit code into onRequestHandlerExecuted() the error messages generated there are still not propagated to the rendered response page. But instead I now get the following error message: ERROR -

Re: How to handle errors in RequestCycle.onEndRequest

2011-10-01 Thread Igor Vaynberg
that sounds like a bug, please create a quickstart and attach it to jira. -igor On Sat, Oct 1, 2011 at 7:29 AM, Christian Huber hub...@butterbrot.org wrote: Hi again, unfortunately my problem still persists. After migrating to 1.5.1 and putting my commit code into  onRequestHandlerExecuted()

Re: How to handle errors in RequestCycle.onEndRequest

2011-10-01 Thread Christian Huber
quickstart created and added to https://issues.apache.org/jira/browse/WICKET-4103 this quickstart does not behave exactly like my application but the primary problem about messages not being displayed is reproducable. please let me know if i can provide any further information and thank you

Re: How to handle errors in RequestCycle.onEndRequest

2011-10-01 Thread Christian Huber
Hi Igor, I just saw you answered to my JIRA issue. I had tried your suggestion about throwing an exception before but to no avail (see also my comment on the issue): I had tried adding throw new RestartResponseException(ErrorPage.class); to the onrequesthandlerexecuted() callback while

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-27 Thread Christian Huber
I was thinking about something like that too, but this does look like a dangerous task. And I think in the long run migrating to 1.5.0 is a better solution. The Sanity Resort http://sanityresort.blogspot.com/ Am 27.09.2011 07:50, schrieb Hans Lesmeister 2: Hi, maybe you can override

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-26 Thread Igor Vaynberg
1.4.x has onRuntimeException() but it has no callback for when the request handler has executed... -igor On Sun, Sep 25, 2011 at 2:20 PM, Christian Huber hub...@butterbrot.org wrote: Sorry for bugging again, but I just saw that IRequestCycleListener is not available in wicket 1.4.x. Is there

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-26 Thread Christian Huber
as i suspected ;-) i have been using onRuntimeException already but without onRequestHandlerExecuted this is not enough. well, off to migration it is then :-) The Sanity Resort http://sanityresort.blogspot.com/ Am 26.09.2011 18:28, schrieb Igor Vaynberg: 1.4.x has onRuntimeException() but

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-26 Thread Hans Lesmeister 2
Hi, maybe you can override WebRequestCycleProcessor.respond: but I did not try if that's too late as well - -- Regards, Hans http://cantaa.de -- View this message in context:

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-25 Thread Christian Huber
Hi Igor, once more thanks for your help. I 'll try that and see how it works out :-) Cheers, Chris The Sanity Resort http://sanityresort.blogspot.com/ Am 24.09.2011 17:18, schrieb Igor Vaynberg: use the onRequestHandlerExecuted() to commit the transaction and onException() to roll it back.

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-25 Thread Christian Huber
Sorry for bugging again, but I just saw that IRequestCycleListener is not available in wicket 1.4.x. Is there an alternative other than switching to 1.5.x? The Sanity Resort http://sanityresort.blogspot.com/ Am 24.09.2011 17:18, schrieb Igor Vaynberg: use the onRequestHandlerExecuted() to

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-24 Thread Christian Huber
Hi again, sorry for reposting, but as I am still struggling with this I thought I try bumping this thread. Any hints would be very welcome. Cheers, Chris The Sanity Resort http://sanityresort.blogspot.com/ Am 19.09.2011 19:50, schrieb Christian Huber: Hi all, I just noticed that

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-24 Thread Dan Retzlaff
So you open both a session and a transaction at the beginning of a request, and commit/close them at the end? I think it's more common to only have the session last through the request, and to have transactions started/committed around DAO or controller methods. This gives your app more control

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-24 Thread Christian Huber
Thanks for your reply Dan. My application is rather simplistic from a persistence point of view, meaning that I want all persistence actions from a request to be atomic. Of course I could move the commit calls out of the RequestCycle class which would solve this particular problem. But does

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-24 Thread Igor Vaynberg
use the onRequestHandlerExecuted() to commit the transaction and onException() to roll it back. these are both in IRequestCycleListener. -igor On Mon, Sep 19, 2011 at 10:50 AM, Christian Huber hub...@butterbrot.org wrote: Hi all, I just noticed that exceptions occuring in onEndRequest of a

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-24 Thread Igor Vaynberg
onEndRequest() is too late to handle any kind of user-facing exception because the response has already been committed. just like in detach(). the only thing that can happen here is that the exception can be logged. -igor On Sat, Sep 24, 2011 at 5:14 AM, Christian Huber hub...@butterbrot.org

Re: How to handle errors in RequestCycle.onEndRequest

2011-09-24 Thread Dan Retzlaff
Maybe one day I'll be able to reply as directly as Igor. :) I didn't know about those two callbacks. On Sat, Sep 24, 2011 at 5:14 AM, Christian Huber hub...@butterbrot.orgwrote: Thanks for your reply Dan. My application is rather simplistic from a persistence point of view, meaning that I

How to handle errors in RequestCycle.onEndRequest

2011-09-19 Thread Christian Huber
Hi all, I just noticed that exceptions occuring in onEndRequest of a RequestCycle somehow do not reflect on the respone page. I am using an AjaxFallbackButton and the OSIV pattern and thus commit my database changes in onEndRequest, now if an exception occurs here I do get a log entry but I