digitalwm
1 Dec 2011, 5:05 AM
Hi ,
I have the following issue:
- on a click event, I create a window in which I put a grid from a standalone variable, initialised at the parsing of the JS file.
- After I close the window, and trigger the click again I get a window with no content inside.
I am using Firefox 4 on this test, and below is my code
function showThing() {
operationWindow = Ext.create('Ext.window.Window', {
title : 'Transaction by account',
layout : 'fit',
items : [ OperationsByAccountGrid ]
});
operationWindow.on('beforeclose', function () {
operationWindow.remove(OperationsByAccountGrid);
});
Ext.StoreMgr.get('operationsByAccountListDataStore').load({
params : {
token : localStorage.getItem('AccessToken'),
}
});
operationWindow.show();
}
and the grid is defined in a js file like
var OperationsByAccountGrid = Ext.create('Ext.grid.Panel', {
autoHeight : true,
autoWidth : true,
layout : 'fit',
width : 800,
store : operationsByAccountListDataStore,
loadMask : true,
columns : [
{
header : '',
resizable : false,
sortable : false,
width : 35,
xtype : 'templatecolumn',
tpl : "<img src='{accountIcon}' width='20' height='20'>",
}
],
dockedItems: [{
xtype : 'pagingtoolbar',
store : operationsByAccountListDataStore,
dock : 'bottom',
displayInfo : true
}],
});
Thanks.
I have the following issue:
- on a click event, I create a window in which I put a grid from a standalone variable, initialised at the parsing of the JS file.
- After I close the window, and trigger the click again I get a window with no content inside.
I am using Firefox 4 on this test, and below is my code
function showThing() {
operationWindow = Ext.create('Ext.window.Window', {
title : 'Transaction by account',
layout : 'fit',
items : [ OperationsByAccountGrid ]
});
operationWindow.on('beforeclose', function () {
operationWindow.remove(OperationsByAccountGrid);
});
Ext.StoreMgr.get('operationsByAccountListDataStore').load({
params : {
token : localStorage.getItem('AccessToken'),
}
});
operationWindow.show();
}
and the grid is defined in a js file like
var OperationsByAccountGrid = Ext.create('Ext.grid.Panel', {
autoHeight : true,
autoWidth : true,
layout : 'fit',
width : 800,
store : operationsByAccountListDataStore,
loadMask : true,
columns : [
{
header : '',
resizable : false,
sortable : false,
width : 35,
xtype : 'templatecolumn',
tpl : "<img src='{accountIcon}' width='20' height='20'>",
}
],
dockedItems: [{
xtype : 'pagingtoolbar',
store : operationsByAccountListDataStore,
dock : 'bottom',
displayInfo : true
}],
});
Thanks.