Hi,
On Thu, Dec 20, 2012 at 11:35 AM, ulf schneider <[email protected]> wrote: > dear developers, > i would like to ask a question about the correct handling of exceptions in > a custom RequestCycleListener. > in concrete: ResponseIOException and StalePageException. > > for the first, the ResponseIOException: in my application it is thrown > only when using Opera with ajax tab panels and images inside of those > panels. > currently i return an EmptyRequestHandler from the onException method if > such an ex will be thrown and everything seems to work ok. > > Yes, this looks OK. ResponseIOException is being thrown when the client closes the connection before the server fully flushed a response for this client. > for the second, the StalePageException that will come seldom, i do respond > with the same EmptyRequestHandler. > Better return null in this case. StalePageException is being thrown when the client tries to use a page instance which has been rendered in another browser tab/window. In this case Wicket detects that the page may have been changed since its rendering and stops the execution of any listener (onClick, onSubmit, ...) and the default processing of StalePageException is to re-render the page instance. The user will have to repeat his action (click a link, submit a form, ...). > > is that a proper treatment of those exceptions or am i doing this wrong? > -- > Ulf Schneider > +49 163 2505164 > Mail: [email protected] > Blog: http://allesagil.net > > Testen Sie http://memyak.com > > D A T E N L A B O R GmbH > Sitz: Paderborn, HRB 8819 > Geschäftsführer: Ulf Schneider > Web: http://datenlabor.net > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/>
