RE: Exception handling wicket 8

2019-02-18 Thread HOPPAN Matúš
Thanks for fast response, ive created quickstart and attached it to JIRA issue
https://issues.apache.org/jira/browse/WICKET-6637

Matus

-Original Message-
From: Martin Grigorov 
Sent: Monday, February 18, 2019 1:49 PM
To: users@wicket.apache.org
Subject: Re: Exception handling wicket 8

Hi,

Sounds like a bug in Wicket.
If you can reproduce it in a quickstart (mini) application then please attach 
it to a ticket in JIRA!
Thanks!

On Mon, Feb 18, 2019 at 2:45 PM HOPPAN Matúš  wrote:

> 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:
> 
> getRequestCycleListeners().add(new
> MyRequestCycleListener());
> 
>
>
> MyRequestCycleListener implements IRequestCycleListener and override
> method
>
>  
> @Override
> public IRequestHandler onException(RequestCycle cycle, Exception ex) {}
>   Optional 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));
>}
> 
>
> 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.
>



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.


Re: Exception handling wicket 8

2019-02-18 Thread Martin Grigorov
Hi,

Sounds like a bug in Wicket.
If you can reproduce it in a quickstart (mini) application then please
attach it to a ticket in JIRA!
Thanks!

On Mon, Feb 18, 2019 at 2:45 PM HOPPAN Matúš  wrote:

> 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:
> 
> getRequestCycleListeners().add(new
> MyRequestCycleListener());
> 
>
>
> MyRequestCycleListener implements IRequestCycleListener and override method
>
>  
> @Override
> public IRequestHandler onException(RequestCycle cycle, Exception ex) {}
>   Optional 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));
>}
> 
>
> 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.
>


Exception handling wicket 8

2019-02-18 Thread HOPPAN Matúš
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:

getRequestCycleListeners().add(new MyRequestCycleListener());



MyRequestCycleListener implements IRequestCycleListener and override method

 
@Override
public IRequestHandler onException(RequestCycle cycle, Exception ex) {}
  Optional 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));
   }


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.


Re: Wicket-jquery-ui question

2019-02-18 Thread Sebastien Briquet
Hi,

If the dialog is instantiated in a lazy loading panel, maybe the issue
could be something like:
http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/

But this kind of behavior is normally fixed in wickte-jquery-ui. But my
guess is that it's somehow related to the event binding...

Please have a look at the generated javascript in your page and try to
isolate the defect...

Thanks,
Sebastien