PDA

View Full Version : beforehide in Ext.panel.Panel not work



neosky
28 Jan 2015, 4:13 AM
Hello i am have Ext.panel.Panel with some components, and for any events i am do listeners. But for beforehide listeners not work.

Code:

Ext.define('TPL.view.book.Book', {
extend: 'Ext.panel.Panel',
alias: 'widget.book',
layout: 'fit',
buttonAlign: 'left',
name: 'bookname',
requires: [ 'Ext.slider.Single' ],
constrain: true,
constructor: function(config) {
this.initConfig(config);
this.callParent(arguments);
},


listeners: {
beforehide: function() {
console.log('Hide!!!');
},
afterrender: function() {
this.mapEnterNew = new Ext.KeyMap(document, {
key: 13,
fn: function(e) {
console.log('click ENTER');
}
});
}
},


initComponent: function() {
Ext.apply(this, {
items: [
{
xtype: 'BookGrid',
}
],
buttons: [
{
text: 'Click here',
action: 'book-create-button',
icon: 'resources/plus.png',
}
]
});
this.callParent(arguments);
},
});

Gary Schlosberg
28 Jan 2015, 9:21 AM
In which specific version of ExtJS are you seeing this? I tried running your code unsuccessfully, but it seems to work in this test case:
https://fiddle.sencha.com/#fiddle/h8n

neosky
29 Jan 2015, 2:38 AM
Thanks, this is fiddle, i am want listeners in xtype:panel, but beforehide in panel not work.

https://fiddle.sencha.com/#fiddle/h9v - listeners in Panel, beforehide not work

Gary Schlosberg
29 Jan 2015, 3:52 PM
Where are you hiding the panel?