You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Lars Törner <la...@gmail.com> on 2016/10/06 08:58:21 UTC
Busy indicator delay with IAjaxIndicatorAware?
Hi everyone!
Is there a best practice in wicket for adding a busy indicator with a delay
for an ajax request?
Or should it be done with a before handler that executes a javascript that
shows the busy indicator after a configured time, and abort this
"busy-indicator-script" with an after-handler when the request returns?
Example:
1. User clicks an ajax-link.
2. A busy indicator is displayed only if the call takes more than a second
to complete.
Cheers
Lasse
Re: Busy indicator delay with IAjaxIndicatorAware?
Posted by Rob Audenaerde <ro...@gmail.com>.
Hi Lars,
I use a CSS animation for this:
.wicket-ajax-indicator
{
visibility:hidden;
animation: appear 0s ease-in 0.5s forwards;
}
-Rob
On Thu, Oct 6, 2016 at 10:58 AM, Lars Törner <la...@gmail.com> wrote:
> Hi everyone!
>
> Is there a best practice in wicket for adding a busy indicator with a delay
> for an ajax request?
>
> Or should it be done with a before handler that executes a javascript that
> shows the busy indicator after a configured time, and abort this
> "busy-indicator-script" with an after-handler when the request returns?
>
> Example:
> 1. User clicks an ajax-link.
> 2. A busy indicator is displayed only if the call takes more than a second
> to complete.
>
> Cheers
> Lasse
>
Re: Busy indicator delay with IAjaxIndicatorAware?
Posted by jonscher <jo...@hotmail.com>.
Hi Lasse,
I have the same probleme. Did you found a solution ?
Can you tell me which solution did you take ?
Thank you very much.
Jonathan
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Busy-indicator-delay-with-IAjaxIndicatorAware-tp4675678p4677604.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Busy indicator delay with IAjaxIndicatorAware?
Posted by Lars Törner <la...@gmail.com>.
Thanks,
I'll take a look at your suggestions!
Lasse
2016-10-06 11:02 GMT+02:00 Martin Grigorov <mg...@apache.org>:
> Hi Lars,
>
> At Apache Isis we use the custom solution for this:
> https://github.com/apache/isis/blob/master/core/viewer-
> wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/
> pages/jquery.isis.wicket.viewer.js#L88-L96
> At my current project I've used the same approach but directly with jQuery
> APIs (#ajaxStart() & #ajaxComplete()) so it covers also non-Wicket Ajax
> calls.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Oct 6, 2016 at 10:58 AM, Lars Törner <la...@gmail.com>
> wrote:
>
> > Hi everyone!
> >
> > Is there a best practice in wicket for adding a busy indicator with a
> delay
> > for an ajax request?
> >
> > Or should it be done with a before handler that executes a javascript
> that
> > shows the busy indicator after a configured time, and abort this
> > "busy-indicator-script" with an after-handler when the request returns?
> >
> > Example:
> > 1. User clicks an ajax-link.
> > 2. A busy indicator is displayed only if the call takes more than a
> second
> > to complete.
> >
> > Cheers
> > Lasse
> >
>
Re: Busy indicator delay with IAjaxIndicatorAware?
Posted by Martin Grigorov <mg...@apache.org>.
Hi Lars,
At Apache Isis we use the custom solution for this:
https://github.com/apache/isis/blob/master/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js#L88-L96
At my current project I've used the same approach but directly with jQuery
APIs (#ajaxStart() & #ajaxComplete()) so it covers also non-Wicket Ajax
calls.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Thu, Oct 6, 2016 at 10:58 AM, Lars Törner <la...@gmail.com> wrote:
> Hi everyone!
>
> Is there a best practice in wicket for adding a busy indicator with a delay
> for an ajax request?
>
> Or should it be done with a before handler that executes a javascript that
> shows the busy indicator after a configured time, and abort this
> "busy-indicator-script" with an after-handler when the request returns?
>
> Example:
> 1. User clicks an ajax-link.
> 2. A busy indicator is displayed only if the call takes more than a second
> to complete.
>
> Cheers
> Lasse
>