こんにちは、sencha アプリケーションに To Do リストがあり、このリストに項目を追加したいと考えています。このリストは、データベース データを含む Web サービスによって提供されます
アイテムを追加すると、データベースで彼を取得できますが、リストが更新されず、これを行う方法がわかりません。
誰かが私を助けることができますか?
ここに私のリスト:
config: {
id:'Listetaches',
grouped:true,
store:'PokerStore',
sorters:'Tache_Libelle',
itemTpl:'{Tache_Libelle} <br/> Durée estimé : {Tache_Estimation} h',
onItemDisclosure :true
}
ここに私の店:
config:{
model:'PlanningPoker.model.Poker',
autoLoad:true,
id:'storeList',
grouper: function(record){
return record.get('Tache_Libelle')[0];
},
proxy:{
type:'ajax',
url:'Myurl',
useDefaultXhrHeader : false,
reader:{
type:'json',
},
},
autoSync: true,
}
ここにアイテムを追加するコントローラー
onAddtache: function(button, e, options) {
var libelle=Ext.getCmp('libelle').getValue();
var description=Ext.getCmp('description').getValue();
Ext.Ajax.request({
url: 'Myurl',
method: 'POST',
useDefaultXhrHeader : false,
params: {
Libelle: libelle,
Description:description,
},
callback: function(options, success, response) {
console.log(response.responseText);
button.up('navigationview').pop();
}
});
},