PDA

View Full Version : How to make a stop in the event store.load ()?



rsddaros
15 Apr 2009, 5:43 PM
Is there a way to make a stop in the event store.load ();

I would treat this event, where store.load() draw write a stop () and do what i need .

I tried: store.on ( 'load',...? but failed to stop at the event .. it still loading .. anyone know an example?

rsddaros
16 Apr 2009, 5:32 AM
any tips?

fay
16 Apr 2009, 5:35 AM
It is a bit difficult to understand your question... Do you mean that you want to perform some processing while the load() is executing?

Note: The load event fires after the records have been loaded.

rsddaros
16 Apr 2009, 6:52 AM
It is a bit difficult to understand your question... Do you mean that you want to perform some processing while the load() is executing?

Note: The load event fires after the records have been loaded.

that, I stop the event load(), and perform an action. Before the records were loaded.

fay
16 Apr 2009, 6:58 AM
Still unclear... have you looked at the beforeload event?

Are you using HttpProxy with the Store? Because this will make an asynchronous call to your server, which you will have no control over until the load finishes, either successfully (load event), or unsuccessfully (load exception event).

rsddaros
16 Apr 2009, 8:22 AM
Still unclear... have you looked at the beforeload event?

Are you using HttpProxy with the Store? Because this will make an asynchronous call to your server, which you will have no control over until the load finishes, either successfully (load event), or unsuccessfully (load exception event).


I'm using:
store.proxy = new Ext.data.HttpProxy (...
store = new Ext.data.JsonStore (....
store.load (...
I tried beforeload but it seems that this event does not work or does not exist.

when I store.on ( 'load', function (e, o) (alert ( "ok ");}); print the alert but the event continues and updates the grid.

Managed to understand what need?

carol.ext
16 Apr 2009, 8:55 AM
Post more code (store and proxy config instead of ...), in code tags (http://extjs.com/learn/Ext_Forum_Help#How_to_post_code_properly).

Are you using autoLoad: true where it might be loading before you add the listener?