日期:2014-05-16 浏览次数:20462 次
Ext.Ajax.request({ url : './dept/getCurrentWeek.do', params : '', method : 'POST', async: false, success : function(response, options) { var currentWeek = response.responseText; currentWeek=parseInt(currentWeek); var arrays = new Array(4); for (var i = 0; i < 4; i++) { arrays[i]=new Ext.Toolbar.Button({text :'W'+(currentWeek+i) ,iconCls : 'icon-home',listeners : { "click" : function() { var buttonText=this.getText(); gridObj.store.reload({params:{ currentWeek:buttonText,deptId:Ext.getCmp('deptColumnTree').getSelectionModel().getSelectedNode().attributes.id}}); } }}); } tbr.add(arrays); tbr.addFill(); }, failure : function() { Ext.Msg.alert("提示信息", "按钮加载失败,请稍后重试!"); } }); };