View Full Version : How to implement a wait/notify mechnism on Ext component?

22 Jul 2010, 2:09 AM
How can implement a wait/notify mechanism on Ext component?
I want to achieve the following behavior:

on 'change' of a TextField value, a asynchronous 'validation' process is executed, and as long as there is no response (with timeout of course) the TextField doesn't lose focus and the User Interface is blocked.

what I need to do to accomplish this behavior ?


22 Jul 2010, 2:28 AM
Never lock the UI. The user will be VERY unsatisfied.

22 Jul 2010, 2:57 AM
Never lock the UI. The user will be VERY unsatisfied.

I see.
I'm gonna disable\enable the field for editing and implement the timeout at the server side!

But... is there anything similar to wait\notify in Ext ?

22 Jul 2010, 4:12 AM
You can provide a callback to your asynchronous call, where you will handle the server's response and mark the field as validated or invalid, re-enable it etc etc.
The syntax depends on the way you're making those calls. For example the "request" method in Ext.Ajax lets you specify a timeout, and different callbacks to handle success and failure.