2012-10-15 51 views
0

嗨即時通訊使用sencha觸摸寫這個android應用程序。如何在接收到httpRequest響應後將數據存儲在Ext.Store中。如何將數據存儲在Ext.Store後收到httpResponse

var result = new XMLHttpRequest(); 
result.onreadystatechange = function(){ 
var respXml = result.responseXML; 
//store this result in Ext.store 

}

result.open("POST",Uri,true); 
result.setRequestHeader("Content-type","application/x-www-form-urlencoded"); 
result.send(restbody); 

回答

0

我想通了。我只是用

var id = result.responseText.split('something');

然後保存到記錄

var record = Ext.create('model',{id:id... }); 


store.add(record);