There are some global callbacks [1]. You might be able to use

Global Ajax call listeners

IAjaxCallListener's can be used to listen for the lifecycle of an Ajax call
for a specific component.
If the user application needs to listen for all Ajax calls then it may
subscribe to the following topics:

   - /ajax/call/before
   - /ajax/call/precondition
   - /ajax/call/beforeSend
   - /ajax/call/after
   - /ajax/call/success
   - /ajax/call/failure
   - /ajax/call/complete

Those replaces the old
Wicket.Ajax.(registerPreCallHandler|registerPostCallHandler|registerFailureHandler)
methods and uses publish/subscribe mechanism.

Example (JavaScript):
Wicket.Event.subscribe('/ajax/call/failure', function(jqEvent, attributes,
jqXHR, errorThrown, textStatus) {
  // do something when an Ajax call fails
});

All global listeners receive the same arguments as the respective
IAjaxCallListener handler plus
jQuery.Event<http://api.jquery.com/category/events/event-object/> that
is passed by the PubSub system. This event is not the event that caused the
Ajax call. The one that caused the Ajax call is 'attrs.event'.

Refereneces

1-https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax


On Sun, Jan 5, 2014 at 11:08 PM, Marco Springer <[email protected]> wrote:

> That's what I use as well, depending on the scenario.
>
> Usually when there's a second modal window open, and closing that second
> modal
> requiring the first modal window to do a repaint on it's current content, I
> display a blocking layer, if the process takes longer than average (e.g.
> >~8
> seconds).
>
> On Sunday, January 05, 2014 10:50:27 PM Ernesto Reinaldo Barreiro wrote:
> > Another way to achieve this is using a blocking layer...
> >
> > On Sun, Jan 5, 2014 at 6:05 PM, jchappelle <[email protected]> wrote:
> > > Thanks for the replies.
> > >
> > > Marco there is a good possibility that is what we are facing too. I
> have
> > > just been guessing at the causes at this point and haven't considered
> the
> > > double click.
> > >
> > > I wonder if there is there a more global way to set that for all Ajax
> > > links
> > > instead of creating a custom AjaxLink component. I would have to touch
> a
> > > lot
> > > of code otherwise.
> > >
> > > --
> > > View this message in context:
> > >
> http://apache-wicket.1842946.n4.nabble.com/Detecting-when-nothing-is-added
> > > -to-AjaxRequestTarget-tp4663469p4663475.html Sent from the Users forum
> > > mailing list archive at Nabble.com.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
>



-- 
Regards - Ernesto Reinaldo Barreiro

Reply via email to