ExtJS と Java の間の通信を阻害しようとしています。ExtJS から netty を使用している Java サーバーにリクエストを送信しています。Java側から応答をフォーマットする方法と、ExtJS側から応答データを読み取る方法の例を誰かが送ってくれたら、感謝します。これはExtJS側からの私のソースです
var store = new Ext.data.JsonStore({
autoload: true,
baseParams: {
conid : '6b09477f-aa04-4f5a-b969-05277d01f07e'
},
root: 'OpenCashTime',
proxy: new Ext.data.ScriptTagProxy({
url: 'http://localhost:8080/getOpenCash?'
}),
fields: [{name: 'Time', mapping: 'Time', type: 'int'}]
});
store.load();
store.on('load', function() {
alert(store.getTotalCount());
});
store.on('write', function() {
alert(store.getTotalCount());
});
store.on('loadexception', function() {
alert("AAAAAA");
});
store.on('metachange', function() {
//alert(store.getTotalCount());
});
store.on('update', function() {
//alert(store.getTotalCount());
});
store.on('save', function() {
//alert(store.getTotalCount());
});
store.on('datachanged', function() {
//alert(store.getTotalCount());
});
このコードを実行してこの応答を受け取ると {"OpenCashTime":[{"Time":1291623637000},{"Time":1294914317000}]}