Ext.Window点击右上角关闭(X按钮)添加监听事件

Ext.Window点击右上角关闭(X按钮)添加监听事件
var cancelRegularMeetingWin = new Ext.Window({
    layout: 'fit',
    width: 740,
    closeAction: 'hide',
    listeners   : {'hide':{fn: clearDataStore}},//关闭时清理搜索框数据和datagrid的数据
    height: 490,
    resizable: false,
    shadow: true,
    modal: true,
    closable: true,
    bodyStyle: 'padding:5 5 5 5',
    animCollapse: true,
    items: [cancelRegularMeetingQueryPanel,cancelRegularMeetingList,cancelRegularMeetingToolbar]

});

//关闭时清理搜索框数据和datagrid的数据
function clearDataStore(){
    cancelRegularMeetingQueryPanel.getForm().reset();
    cancelRegularMeetingList.getStore().removeAll();
    cancelRegularMeetingQueryPanel.getForm().remove(Ext.getCmp('HYSXXGLID'));
}

你可能感兴趣的:(JavaEE-Web前台)