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 - DefaultExceptionMapper     - Unexpected error occurred
java.lang.IllegalStateException: Header was already written to response!

So it seems that at this it is still to late to anything to the current response.

As before the error messages do get displayed after the following request.

At the moment I am totally stumped. Does anyone have a clue what I am doing wrong here?

Thanks, 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. 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 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 cannot get my application to display the corresponding error
to the user.

Adding a message to the feedback panel does not help as the message gets
displayed on the following request but not the current one. I also tried
using various AbortExceptions like RedirectToUrlException,
RestartResponseException or AbortWithWebErrorCodeException. This did improve
the situation as far as the request did get aborted but there is still no
visual display of the error.

Setting the ResponsePage directly and/or setting redirect to true did not
change anything.

This sounds like a common problem and so I guess there is an easy solution
to it, but I just don't get it right now, so any pointers are welcome.

Thanks, Chris

--
The Sanity Resort<http://sanityresort.blogspot.com/>

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

Reply via email to