extjs 请问我点击一个button如何把日历的数据eventStore,calendarStore重新绑定
请问我点击一个button如何把eventStore,calendarStore重新加载01.//Setupthedatastoresusedbythecalendar0...
请问我点击一个button如何把eventStore,calendarStore重新加载
01.// Set up the data stores used by the calendar
02.this.calendarStore = new Ext.data.JsonStore({
03. // config options
04.});
05.this.eventStore = new Ext.data.JsonStore({
06. // config options
07.});
08.
09.// Set up the UI
10.new Ext.Viewport({
11. layout: 'border',
12. items: [{
13. id: 'app-header',
14. region: 'north',
15. // etc. -- static header area
16. },{
17. id: 'app-center',
18. region: 'center',
19. layout: 'border',
20. items: [{
21. id:'app-west',
22. region: 'west',
23. // etc. -- sidebar region configs
24. },{
25. // This is the start of the calendar
26. xtype: 'calendarpanel',
27. region: 'center',
28.
29. // Tie the data stores to the calendar
30. eventStore: this.eventStore,
31. calendarStore: this.calendarStore,
方法1:bindStore报错
// 会议室查询处理
Ext.getCmp(''app-calendar').store= this.calendarStore;
Ext.getCmp('app-calendar').bindStore(this.calendarStore);
方法2:不能再度绑定DB里新的数据
// 会议室查询处理
Ext.getCmp('app-calendar').eventStore.removeAll();
Ext.getCmp('app-calendar').eventStore.load(); 展开
01.// Set up the data stores used by the calendar
02.this.calendarStore = new Ext.data.JsonStore({
03. // config options
04.});
05.this.eventStore = new Ext.data.JsonStore({
06. // config options
07.});
08.
09.// Set up the UI
10.new Ext.Viewport({
11. layout: 'border',
12. items: [{
13. id: 'app-header',
14. region: 'north',
15. // etc. -- static header area
16. },{
17. id: 'app-center',
18. region: 'center',
19. layout: 'border',
20. items: [{
21. id:'app-west',
22. region: 'west',
23. // etc. -- sidebar region configs
24. },{
25. // This is the start of the calendar
26. xtype: 'calendarpanel',
27. region: 'center',
28.
29. // Tie the data stores to the calendar
30. eventStore: this.eventStore,
31. calendarStore: this.calendarStore,
方法1:bindStore报错
// 会议室查询处理
Ext.getCmp(''app-calendar').store= this.calendarStore;
Ext.getCmp('app-calendar').bindStore(this.calendarStore);
方法2:不能再度绑定DB里新的数据
// 会议室查询处理
Ext.getCmp('app-calendar').eventStore.removeAll();
Ext.getCmp('app-calendar').eventStore.load(); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询