Re: AjaxLazyLoadingPanel finished event?

2012-12-09 Thread pkc
Hi Martin, Just to follow up, I tried overriding getLoadingComponent but the handler is not an AjaxRequestTarget so find(AjaxRequestTarget) returns null. Could this be because I'm forcing the panel (and its tree component) to refresh when browser refresh is hit? I will open a feature request

Re: AjaxLazyLoadingPanel finished event?

2012-12-07 Thread Martin Grigorov
Hi, Indeed there is no explicit method for this. The only way I see is to override org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel#getLoadingComponent and use getRequestCycle().find(AjaxRequestTarget.class) to get the target and use it. Please file a ticket for improvement. On

Re: AjaxLazyLoadingPanel finished event?

2012-12-07 Thread Ernesto Reinaldo Barreiro
Martin. Wouldn't AjaxRequestTarget.get() work as well? On Fri, Dec 7, 2012 at 9:22 AM, Martin Grigorov mgrigo...@apache.orgwrote: Hi, Indeed there is no explicit method for this. The only way I see is to override

Re: AjaxLazyLoadingPanel finished event?

2012-12-07 Thread Martin Grigorov
AjaxRequestTarget.get() is the API for Wicket 1.5 In Wicket 6 ART is an interface and there is no way to have static method, so getRequestCycle().find(IRequestHandler.class) is introduced. It can be used for any impl of IRequestHandler, not just AjaxRequestTarget. On Fri, Dec 7, 2012 at 9:27 AM,

Re: AjaxLazyLoadingPanel finished event?

2012-12-07 Thread Ernesto Reinaldo Barreiro
Thanks for explanation! On Fri, Dec 7, 2012 at 9:32 AM, Martin Grigorov mgrigo...@apache.orgwrote: AjaxRequestTarget.get() is the API for Wicket 1.5 In Wicket 6 ART is an interface and there is no way to have static method, so getRequestCycle().find(IRequestHandler.class) is introduced. It

Re: AjaxLazyLoadingPanel finished event?

2012-12-07 Thread Ernesto Reinaldo Barreiro
Martin. Would it make sense to add class /** * Instance finder. * */ public static final class Instance { /** * * @return The instance of AjaxRequestTarget. */ public static AjaxRequestTarget get() { return RequestCycle.get().find(AjaxRequestTarget.class); } } to

Re: AjaxLazyLoadingPanel finished event?

2012-12-07 Thread Martin Grigorov
No one asked for such API so far. When we did it with RequestCycle.get().find(AjaxRequestTarget.class) several Wicket devs agreed on this API. On Fri, Dec 7, 2012 at 10:56 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Martin. Would it make sense to add class /** *

Re: AjaxLazyLoadingPanel finished event?

2012-12-07 Thread Ernesto Reinaldo Barreiro
Yes I understand that... but IMHO it would certainly help migrating as you would only need to insert .Instance to get your old code working. On Fri, Dec 7, 2012 at 11:16 AM, Martin Grigorov mgrigo...@apache.orgwrote: No one asked for such API so far. When we did it with

Re: AjaxLazyLoadingPanel finished event?

2012-12-07 Thread Martin Grigorov
This change is properly documented in the migration guide and as I said so far no one complained :-) Your suggestion sounds like a helper for the migration which we wont be able to remove in the future. On Fri, Dec 7, 2012 at 11:33 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Yes

Re: AjaxLazyLoadingPanel finished event?

2012-12-07 Thread Ernesto Reinaldo Barreiro
Martin, On Fri, Dec 7, 2012 at 11:39 AM, Martin Grigorov mgrigo...@apache.orgwrote: This change is properly documented in the migration guide and as I said so far no one complained :-) Your suggestion sounds like a helper for the migration which we wont be able to remove in the future.