I'm regularly running into problems when integrating client-side ajax code.
 The issue is that the client-side code is doing throttled asynchronous
calls to wicket ajax behaviors.
Now, this generally works fine until I want to integrate this with native
wicket calls (links, buttons).  Then, such throttled calls should be flushed
before the native request is sent to the server.

The only way I can see/make this work is by registering pre-call handlers
and doing the requests synchronously from the pre-call handler.
A short explanation; the request cannot be done asynchronously as there is
no guarantee that it will arrive at the server before the original call
(that triggered the pre-call handler) arrives.
This is clumsy and, generally, error-prone.

It also appears to be partly re-doing what Wicket's channels already do, as
channels take care of request ordering.  So I wonder whether I am
overlooking something.  How do you guys handle this?

Thinking out loud: would it be possible to have a 'throttled' channel that
is flushed whenever a request is scheduled on the default channel ("0|s")?
That way, third-party JS lib integrations could schedule calls to this
channel on every key-stroke, having the synchronization handled
automatically.

cheers, Frank


-- 
Hippo Europe  •  Amsterdam  Oosteinde 11  •  1017 WT Amsterdam  •  +31 (0)20
522 4466
USA  • San Francisco 755 Baywood Drive, Second Floor •  Petaluma, CA. 94954
•  +1 877 414 4776 (toll free)
Canada    •   Montréal  5369 Boulevard St-Laurent #430 •  Montréal QC H2T
1S5  •  +1 (514) 316 8966
www.onehippo.com  •  www.onehippo.org  •  [email protected]
________________________________________________________________
This e-mail may be privileged and/or confidential, and the sender does
not waive any related rights and obligations. Any distribution, use or
copying of this e-mail or the information it contains by other than an
intended recipient is unauthorized. If you received this e-mail in
error, please advise me (by return e-mail or otherwise) immediately.

Reply via email to