Hi, recently we have upgraded our application, from wicket 7.11 to wicket 8.3.0. With wicket 7 everything seemed to be fine, however in wicket 8 we have an issue with handling exception. In Application we have in init() method: <code> getRequestCycleListeners().add(new MyRequestCycleListener()); </code>
MyRequestCycleListener implements IRequestCycleListener and override method <code> @Override public IRequestHandler onException(RequestCycle cycle, Exception ex) {} Optional<AjaxRequestTarget> target = cycle.find(AjaxRequestTarget.class); //this part stopped working since it return Optional.empty(), because active RequestHandler //and RequestHandlerScheduledAfterCurrent are both null if (target.isPresent()) { return target.get(); } IPageRequestHandler last = PageRequestHandlerTracker.getLastHandler(RequestCycle.get()); WebPage page = (WebPage) (last.getPage()); return new RenderPageRequestHandler(new PageProvider(currentPage)); } </code> Is this a wicket bug or it was intention to work like this? If it was intentended, is there any workaround to get the AjaxRequestTarget? Or the approach has changed in wicket 8? Any other ideas? Matus ________________________________ Táto správa je určená iba pre uvedeného príjemcu a môže obsahovať dôverné alebo interné informácie. Ak ste ju omylom obdržali, upovedomte o tom prosím odosielateľa a vymažte ju. Akýkoľvek iný spôsob použitia tohto e-mailu je zakázaný. This message is for the designated recipient only and may contain confidential or internal information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited.