View Full Version : Ajax request within a preprocessor

20 Sep 2011, 1:24 AM

I created a preprocessor (registered via Ext.Class.registerPreprocessor), and for certain kind of classes it will create an ajax request. Depending on the result of this ajax request, the class will be altered or not.

Class Init -> Preprocessor 1 -> My Preprocessor -> Ajax Request Query + Response -> Preprocessor 2 -> Class Instancied

It would be easy if I was able to call the "next" preprocessor by myself, but I don't know if I can do that. I tried a few things, but whatever I do the next preprocessor is called automatically, and I have no control on the final instance.

How can I do that?

Thanks a lot!

20 Sep 2011, 3:21 AM
Could you perhaps run your ajax request in synchronous mode?

20 Sep 2011, 5:07 AM
Run an asynchronous request synchronously? :) How?

20 Sep 2011, 5:12 AM
Try setting 'async : false' in your Ext.Ajax.request call.

20 Sep 2011, 11:39 PM
Thanks a lot! That was easy :)