mik3e
12 Feb 2012, 12:23 PM
I think I found a bug in the current beta release of 4.1 (not sure, but maybe someone can confirm this):
REQUIRED INFORMATION Ext version tested:
Ext 4.1.0 rev Beta 2
Browser versions tested against:
FF 10.0
Chrome 16.0
DOCTYPE tested against:
HTML5
Description:
If you use a grid with a CheckboxModel and this grid is placed in a tabpanel, than the checkboxmodel is missing if you close the tab and open it again.
Steps to reproduce the problem:
Place a grid with a checkboxmodel in a tab
Write a controller which loads the grid in the tab on an action (e.g. button click)
{*] Open a tab - the checkboxmodel is shown
Close the tab with the integrated icon
Open it a second time -> The Checkboxmodel (-column) in the grid is missing
The result that was expected:
A grid with the CheckboxModel
The result that occurs instead:
Grid without CheckboxModel
Test Case:
This is the Controller I´m using to open the tab:
/**
* Reacts on a menu item click and loads the view xtype which is defined
* at the menu item to the desired location.
*
* @param {Ext.view.View} tablepanel The panel where the click event was fired.
* @param {Ext.data.Model} record The record which belongs to the clicked item.
* @param {HTMLElement} item The item´s element.
* @param {Number} index The item's index.
* @param {Ext.EventObject} e The raw event object
* @param {Object} eOpts The options object passed to Ext.util.Observable.addListener.
*/
doMenuItemClick: function(tablepanel, record, item, index, e, options) {
var tabPanelMain = Ext.ComponentQuery.query('#tabpanel_main')[0];
// Open tab only if the menu node is a leaf node
if (record.isLeaf()) {
// Load the new component in the main Tab Panel
if (record.raw.loadTarget=='tabPanelMain') {
tabPanelMain.add({
xtype: record.raw.loadxtype,
tabConfig: {
title: record.raw.loadTitle,
tooltip: record.raw.loadToolTip,
closable: true
}
}).show();
}
}
}, HELPFUL INFORMATION Possible fix:
I think there is a problem with remove and create of the tab and it´s content
Operating System:
W7 64Bit
REQUIRED INFORMATION Ext version tested:
Ext 4.1.0 rev Beta 2
Browser versions tested against:
FF 10.0
Chrome 16.0
DOCTYPE tested against:
HTML5
Description:
If you use a grid with a CheckboxModel and this grid is placed in a tabpanel, than the checkboxmodel is missing if you close the tab and open it again.
Steps to reproduce the problem:
Place a grid with a checkboxmodel in a tab
Write a controller which loads the grid in the tab on an action (e.g. button click)
{*] Open a tab - the checkboxmodel is shown
Close the tab with the integrated icon
Open it a second time -> The Checkboxmodel (-column) in the grid is missing
The result that was expected:
A grid with the CheckboxModel
The result that occurs instead:
Grid without CheckboxModel
Test Case:
This is the Controller I´m using to open the tab:
/**
* Reacts on a menu item click and loads the view xtype which is defined
* at the menu item to the desired location.
*
* @param {Ext.view.View} tablepanel The panel where the click event was fired.
* @param {Ext.data.Model} record The record which belongs to the clicked item.
* @param {HTMLElement} item The item´s element.
* @param {Number} index The item's index.
* @param {Ext.EventObject} e The raw event object
* @param {Object} eOpts The options object passed to Ext.util.Observable.addListener.
*/
doMenuItemClick: function(tablepanel, record, item, index, e, options) {
var tabPanelMain = Ext.ComponentQuery.query('#tabpanel_main')[0];
// Open tab only if the menu node is a leaf node
if (record.isLeaf()) {
// Load the new component in the main Tab Panel
if (record.raw.loadTarget=='tabPanelMain') {
tabPanelMain.add({
xtype: record.raw.loadxtype,
tabConfig: {
title: record.raw.loadTitle,
tooltip: record.raw.loadToolTip,
closable: true
}
}).show();
}
}
}, HELPFUL INFORMATION Possible fix:
I think there is a problem with remove and create of the tab and it´s content
Operating System:
W7 64Bit