Hi all!

In our application, we use two distinct Ajax Channels:
- The default one, using the default Queue type
- A dedicated channel for what we call "actions" of type Active

All "actions" use a same class of Behavior that sets the channel in the ajax attributes.

What I'd like to achieve is that whenever a callback is scheduled in the "action" channel, the action channel should wait that the default channel (or all other channels registered in the channel manager) is no longer busy before processing this callback.

Furthermore, I'd like that all attributes evaluation (being ajax attributes extra parameters or dynamic extra parameters) be deferred until no other channel is busy any more.

I was thinking of using an IAjaxCallListener in our ActionBehavior by implementing the getBeforeHandler() method. Looking at the Wicket.Channel and Wicket.ChannelManager, I guess it is relatively easy to determine whether any other channel is busy, but I don't see how I could defer the scheduling of the callback until then.

The other idea I came up with, but was not capable of implementing, is wrapping the getCallbackScript() of our ActionBehavior in a function that tests if any other channel is busy, and if so, simply reschedule its execution by calling window.setTimeout(). But then, I do not see a way to let this wrapping function return the result of the wrapped callback...

Does anyone have any idea on how to achieve this? Or if this is event possible?

Thank you in advance!

Cheers,

Antoine.

--
-------------
Antoine Angénieux
Co-founder
mob: +33 6 60 21 09 18
aangeni...@clinigrid.com
-------------
Clinigrid
92/98 boulevard Victor Hugo
93300 Clichy Cedex
Tel: +33 1 55 90 66 84
-------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to