Tom Wollert wrote:
Hello there,
I have a problem with my Wicket Application, which is quite Ajax heavy.
Certain ajax calls take some time as they start an import, however the
button can still be clicked and sends another ajax call (which is delayed
for quite some time). Is it possible to disable the button while the request
cycle is not complete? (I mean with wicket, or do I need to use
Javascript?). Also ajax calls are postponed as long as the channel is busy,
is it possible to deactivate this behaviour? And are there reasons why I
should not?
Normally I guess we do not want to do that (disabling all the other
buttons ,etc). Often the reason we use ajax is to make the user requests
handled asynchronysly. But for something that really critical like
handling credit card payment, I think its still a good idea to disable
any other actions on the same page.
I did not have this problem(flooding) myself, but I think you may
consider using a "event bus" to tackle it. So all the ajax events are
queued into the bus then handled by your server layer when it can. Plus
you will have the benefits to have a centralized place to prioritize the
events, doing some sort of load balancing.
Jason Wang
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]