PDA

View Full Version : How to get the "tid" from DirectStore request?



27 Sep 2009, 7:49 PM
As title, I can see the POST sent the JSON to the server:
{"action":"XXXStore","method":"getXXX","data":["xxx",0,10],"type":"rpc","tid":8}

how can I get the "tid":8 from the store/proxy object? (I'd want to retrieve it beforeload)


Thanks!

Condor
27 Sep 2009, 10:05 PM
You can the the transaction id from the beforecall event of the RemotingProvider.

27 Sep 2009, 10:18 PM
You can the the transaction id from the beforecall event of the RemotingProvider.

thx Condor, as the document said:

transaction : Ext.Direct.Transaction

but there are 5 ajax requests (all are directStore) call to the server at the same time in one page..

So, how can I get the specific tid of one of the requests?

PS: there's seems to be something wrong of doc of Ext.Direct.Transaction...?

thanks in advance!

Condor
27 Sep 2009, 10:27 PM
The proxy doesn't know anything about the transaction. It's the RemotingProvider that is adding the transaction id.

27 Sep 2009, 10:43 PM
After investigate the source code, the transaction object encapsulates all the live requests in an array form.

So I have to filter the specific transaction by myself.

pls correct me if I'm wrong, thanks.