How can i get edited row value from Editable Grid in ExtJs? - extjs

I've a HTML page with ExtJs editable grid. Edit is working fine, but i want to get Id field value of the edited row, but can't figured it out... i want to populate another array of values with Id, Name and Email field values of edited ROW...
Ext.onReady(function() {
Ext.create('Ext.data.Store', {
storeId:'myArray',
fields:['id','name', 'email'],
data:{'items':[
{"id":"1", "name":"Lisa", "email":"lisa#ArrayData.com"},
{"id":"2", "name":"Bart", "email":"bart#ArrayData.com"},
{"id":"3", "name":"Homer", "email":"home#ArrayData.com"},
{"id":"4", "name":"Marge", "email":"marge#ArrayData.com"}
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
Ext.create('Ext.grid.Panel', {
title: 'ArrayData',
store: Ext.data.StoreManager.lookup('myArray'),
columns: [
{header: 'Id', dataIndex: 'id'},
{header: 'Name', dataIndex: 'name', editor: 'textfield'},
{header: 'Email', dataIndex: 'email', flex:1,
editor: {
xtype: 'textfield',
allowBlank: false
}
}
],
selType: 'cellmodel',
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1,
listeners : {
scope: this,
edit: function (theEditor, e, eOpts)
{
console.log();
}
}
})
],
height: 200,
width: 500,
renderTo: Ext.getBody()
});
});
#
#
Thanks #Hariharan and #Dipti for your valuable help... the working code is-
Ext.create('Ext.data.Store', {
storeId:'myArray',
fields:['id','name', 'email'],
data:{'items':[
{"id":"1", "name":"Lisa", "email":"lisa#ArrayData.com"},
{"id":"2", "name":"Bart", "email":"bart#ArrayData.com"},
{"id":"3", "name":"Homer", "email":"home#ArrayData.com"},
{"id":"4", "name":"Marge", "email":"marge#ArrayData.com"}
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
var array_edited=Ext.create('Ext.data.Store', {
storeId:'myArray_edited',
fields:['id','name', 'email'],
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
Ext.create('Ext.grid.Panel', {
title: 'ArrayData',
store: Ext.data.StoreManager.lookup('myArray'),
columns: [
{header: 'Id', dataIndex: 'id'},
{header: 'Name', dataIndex: 'name', editor: 'textfield'},
{header: 'Email', dataIndex: 'email', flex:1,
editor: {
xtype: 'textfield',
allowBlank: false
}
}
],
selType: 'cellmodel',
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1,
listeners : {
scope: this,
edit: function(editor, e) {
array_edited.add({
id: e.record.get('id'),
name: e.record.get('name'),
email: e.record.get('email')
});
}
}
})
],
height: 200,
width: 500,
renderTo: Ext.getBody()
});
Ext.create('Ext.grid.Panel', {
title: 'ArrayDataEdited',
store: Ext.data.StoreManager.lookup('myArray_edited'),
columns: [
{header: 'Id', dataIndex: 'id'},
{header: 'Name', dataIndex: 'name'},
{header: 'Email', dataIndex: 'email', flex:1
}
],
selType: 'cellmodel',
height: 200,
width: 500,
renderTo: Ext.getBody()
});

Please refer below answer, i hope it will help you.
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1,
listeners : {
edit : function(editor, e) {
alert("Edited id value : " + e.record.get('id'));
}
}
})
],

check this, you have gridPanel with three columns , using sm you can select values of editables, after save you can call fnctChange function and use the new values.
hope this will help you.
var gridPanel = new Ext.grid.GridPanel({
region : 'west',
width : 360,
height : 250,
trackMouseOver : false,
disableSelection : true,
autoscroll : true,
loadMask : true,
margins : '3 3 3 0',
sm : sm,
viewConfig : {
forceFit : true
},
store : store,
// grid columns
columns : [ sm, {
id : 'columnNames',
header : "<b>Select the column names to be displayed</b>",
dataIndex : 'columnNames',
renderer : renderColumnNames,
width : 360,
sortable : true
}, { id : 'col1ID',
header : "",
dataIndex : 'Col1',
hidden : true,
sortable : true
}, {
id : 'col2ID',
header : "",
dataIndex : 'Col2',
hidden : true,
sortable : true
}]
});
var settingPanelMsg = " <b>Change save</b><br></br>"
var settingPanel = new Ext.Panel({
region : 'center',
width : 390,
height : 250,
margins : '3 0 3 3',
collapsible : true,
html : settingPanelMsg
})
winSetting = new Ext.Window({
title : 'Customize Your chnage',
layout : 'border',
closable : false,
height : 300,
width : 730,
items : [ gridPanel, settingPanel ],
buttons : [ {
text : 'Close',
handler : function(e, target, panel) {
winLibSetting.close();
}
}, {
text : 'Save',
handler : function() {
if (fnctChange() == true) {
winLibSetting.close();
}
}
} ]
});
winLibSetting.show();
function fnctChange() {
var L1 = sm.getSelections();
for (i = 0; i < L1.length; i++) {
var col1value = L1[i].data.col1ID;
if (L1[i].data.col2ID == true) {
var colName= L1[i].data.columnNames;
Ext.MessageBox.alert(' ',
'colName :'+colName);
}
}
return true;
}

Related

Extjs4 - Ext.grid.Panel not updated with data inserted into Ext.data.Store using loadData function

I have a listener defined on çhange event for an item filefield in a Panel. Using loadData method, on the Store with id documentGridStore, I am able to insert data into the store (debugger shows store updated) and count printed below correctly gets updated each time. But, the Panel is not getting updated no matter what I do.
Please suggest what is wrong/missing here. I have provided most of the relevant code.
Ext.define('uploadPaperDocumentDialogPanel', {
extend:'Ext.form.Panel',
...,
items: [{
xtype: 'combobox',
name: 'documentType',
id: 'docTypeId',
fieldLabel: getText('label.document.type'),
emptyText: getText('label.select.type'),
store: 'docTypeStore',
displayField: 'key',
valueField: 'value',
allowBlank : false,
selectOnFocus : true,
typeAhead: true,
forceSelection : true,
queryMode:'local',
width: 400
},
{
xtype:'filefield',
buttonText: 'Browse',
msgTarget: 'qtip',
name:'files[]',
id:'fileId',
allowBlank:false,
style: "padding-left: 5px;padding-right: 20px",
width: 275,
listeners: {
change: function(fld, value){
var files = fld.fileInputEl.dom.files;
var names = [];
if(files){
names.push({"documentType": Ext.getCmp('docTypeId').getValue() , "fileName": files[0].name});
Ext.data.StoreManager.lookup('documentGridStore').loadData(names, true);
console.log(Ext.data.StoreManager.lookup('documentGridStore').getCount());
}
}
},
uploadDocumentGrid
}]
});
Ext.define('DocumentGridModel', {
extend: 'Ext.data.Model',
fields:[
{name : 'documentType' , type : 'string'}
,{name : 'fileName',type : 'string'}
]
});
var UploadDocumentStore = Ext.create('Ext.data.Store', {
model: 'DocumentGridModel',
storeId:'documentGridStore',
data:[]
});
var uploadDocumentGrid = Ext.define('DocumentGrid', {
extend:'Ext.grid.Panel'
,alias:'widget.documentGridId',
width: 400,
border:true,
bodyPadding: 0,
title: 'Documents to be uploaded',
id:'documentGridId',
iconCls: 'icon-stipNote',
columnLines: true
,store: Ext.data.StoreManager.lookup('uploadDocumentGridStore')
,initComponent : function() {
this.columns= [
{
header : 'Document Type',
id : 'documentType',
dataIndex : 'doctype',
flex:1,
align:"left",
editable : false,
sortable: false,
hideable: false,
resizable: false,
}, {
header : 'Filename',
id : 'fileName',
dataIndex : 'filename',
flex:1,
align:"left",
sortable: false,
hideable: false,
resizable: false,
editable : false
}
];
this.store=UploadDocumentStore;
this.callParent();
},
reloadGrid : function() {
this.store.reload();
},
viewConfig: {
emptyText: getText('queuegrid.pagingtoolbar.nodatamessage')
}
});
As #Arthur Rubens indicated, I started checking uploadDocumentGrid grid. And guess what that is where the problem was!
dataIndex field in uploadDocumentGrid for both columns was not matching with DocumentGridModel columns.
I updated uploadDocumentGrid as follows and values reflected on UI:
var uploadDocumentGrid = Ext.define('DocumentGrid', {
extend:'Ext.grid.Panel'
,alias:'widget.documentGridId',
width: 400,
border:true,
bodyPadding: 0, // Don't want content to crunch against the borders
title: 'Documents to be uploaded',
id:'documentGridId',
iconCls: 'icon-stipNote',
columnLines: true //INITCOMPONENT
,store: Ext.data.StoreManager.lookup('uploadDocumentGridStore')
,initComponent : function() {
this.columns= [
{
header : 'Document Type',
id : 'documentType',
dataIndex : 'documentType',
flex:1,
align:"left",
editable : false,
sortable: false,
hideable: false,
resizable: false,
}, {
header : 'Filename',
id : 'fileName',
dataIndex : 'fileName',
flex:1,
align:"left",
sortable: false,
hideable: false,
resizable: false,
editable : false
}
];
this.store=UploadDocumentStore;
//finally call the super classes implementation
this.callParent();
},
// RELOADGRID
reloadGrid : function() {
this.store.reload();
},
viewConfig: {
emptyText: getText('queuegrid.pagingtoolbar.nodatamessage')
}
});
I am still learning extjs. Thanks a lot for your help!

How to pass parameter in Store to web api

How can we pass a parameter in store. I am new to ExtJs pls suggest me.
xtype: 'grid',
store: {
type: 'webapi',
//extraParams: {
//ID: 20
//},
//Params: {
//ID: 20
//},
api: {
read: 'api/Report/GetInfo'
},
autoLoad: true,
},
columns: [
{ header: 'All', xtype: 'checkcolumn', dataIndex: 'flag', width: '10%' },
{ header: 'Code', dataIndex: 'code', width: '15%' },
{ header: 'Name', dataIndex: 'name', width: '15%' },
{ header: 'State', dataIndex: 'state', width: '15%' }
],
Tried by using Params and extraPrams but no success.
Check this way:
xtype : 'grid',
store : {
type : 'webapi',
proxy : {
type : "ajax",
extraParams: {
ID: 20
}
},
api : {
read: 'api/Report/GetInfo'
},
autoLoad: true
}
Or you could add extra params in your grid in initComponent() function:
initComponent: function(){
var me = this,
myId = 20;
me.callParent(arguments);
var store = me.getStore();
store.getProxy().extraParams = {
ID:myId
}
}
Try this it should work
Ext.create('Ext.data.Store', {
...
proxy : {
type : 'ajax',
url : 'url',
reader : {
rootProperty : 'data',
}
},
listeners:{
beforeload: function(store){
Ext.apply(this.proxy.extraParams, {
"ID" : 20
});
}
},

Load treegrid data dyanamically from a json property file in extjs

Treegrid is not getting rendered properly. Here is the code:
treeGrid.js :
Ext.define('App.view.DBStatusGrid', {
extend : 'Ext.container.Container',
xtype : 'app-DB-grid',
layout : 'vbox',
items : [
{
xtype : 'container',
cls : 'boxTitle',
html : 'DB Details'
},
{
xtype : 'treepanel',
singleExpand: true,
useArrows:true,
rootVisible:false,
columns: [
{text: 'Server Status', dataIndex: 'serverStatus' , width: 80,},
{ xtype: 'treecolumn',text: 'Server Name', dataIndex: 'serverName' , width: 140},
{ text: 'Instance Status', align:'center', dataIndex: 'instanceStatus',width: 80,},
{text: 'Instance Name', align:'center', dataIndex: 'instanceName',width: 140}
]
}
]
});
property.json :
"data":[
{
"serverStatus": "active",
"serverName":"rg0C1",
"iconCls":"task-folder",
"expanded":false,
"data": [
{
"instanceStatus": "active",
"instanceName":"OA1",
"leaf":true,
"iconCls":"no-icon"
}
]
}
]
Creating store
Ext.define('App.view.InnerContainerView', {
extend : 'Ext.container.Container',
xtype : 'app-inner-ContainerView',
config : {
component : 'NONE',
parentView : ''
},
initComponent : function() {
var parentView = this.getParentView();
this.items = [
{
xtype : 'container',
layout: 'card',
items : [
{
xtype: 'app-DB-grid',
parentView: parentView,
listeners :{
render : function(){
var store = Ext.create('Ext.data.TreeStore',
{
model: 'App.model.treeModel',
autoLoad: true,
proxy: {
type: 'ajax',
url:'app/data/property.json',
reader: {
type: 'json',
root : 'data'
}
},
root :{
expanded :true
}
});
this.down('treepanel').setRootNode(store.getRootNode()); // I am getting my treegrid,and setting the rootnode.
}
]
}
]
this.callParent();
});
My Problem :
From the json property file,only serverName is getting displayed in the treegrid.When I try to expand the serverName,it is not getting expanded.Please help me resolve this issue.Please point me to the correct direction if I am going wrong somewhere.Any help would be appreciated.Thanks.
What about having the store available before the component is created?
Ext.widget({
renderTo: Ext.getBody(),
xtype : 'treepanel',
singleExpand: true,
useArrows:true,
rootVisible:false,
columns: [
{text: 'Server Status', dataIndex: 'serverStatus' , width: 80,},
{xtype: 'treecolumn',text: 'Server Name', dataIndex: 'serverName' , width: 140},
{text: 'Instance Status', align:'center', dataIndex: 'instanceStatus',width: 80,},
{text: 'Instance Name', align:'center', dataIndex: 'instanceName',width: 140}
]
,store: Ext.create('Ext.data.TreeStore', {
model: 'App.model.treeModel',
autoLoad: true,
proxy: {
type: 'ajax',
url:'property.json',
reader: {
type: 'json',
root : 'data'
}
},
root :{
expanded :true
}
})
});
I assumed from the presence of the xtype that you didn't define a class for that component, but that could also be done:
Ext.define('My.TreePanel', {
extend: 'Ext.tree.Panel',
singleExpand: true,
useArrows:true,
rootVisible:false,
columns: [
{text: 'Server Status', dataIndex: 'serverStatus' , width: 80,},
{xtype: 'treecolumn',text: 'Server Name', dataIndex: 'serverName' , width: 140},
{text: 'Instance Status', align:'center', dataIndex: 'instanceStatus',width: 80,},
{text: 'Instance Name', align:'center', dataIndex: 'instanceName',width: 140}
]
// Providing only configuration (as opposed to a store instance) in order for
// each tree to have its own store instance
,store: {
model: 'App.model.treeModel',
autoLoad: true,
proxy: {
type: 'ajax',
url:'property.json',
reader: {
type: 'json',
root : 'data'
}
},
root :{
expanded :true
}
}
});
Ext.create('My.TreePanel', {
renderTo: Ext.getBody()
});
Or this way, that would allow us to be more dynamic with the store creation:
Ext.define('My.TreePanel', {
extend: 'Ext.tree.Panel',
singleExpand: true,
useArrows:true,
rootVisible:false,
columns: [
{text: 'Server Status', dataIndex: 'serverStatus' , width: 80,},
{xtype: 'treecolumn',text: 'Server Name', dataIndex: 'serverName' , width: 140},
{text: 'Instance Status', align:'center', dataIndex: 'instanceStatus',width: 80,},
{text: 'Instance Name', align:'center', dataIndex: 'instanceName',width: 140}
]
,initComponent: function() {
// Creating store instance myself at creation time
this.store = Ext.create('Ext.data.TreeStore', {
model: 'App.model.treeModel',
autoLoad: true,
proxy: {
type: 'ajax',
url:'property.json',
reader: {
type: 'json',
root : 'data'
}
},
root :{
expanded :true
}
});
// Don't forget to call the superclass method!
this.callParent(arguments);
}
});
Ext.create('My.TreePanel', {
renderTo: Ext.getBody()
});

Ext Js combobox value after onchange is value instead of label

Just getting frustrated by something that should be an easy fix, but I'm too simple minded to see it :)
I'm having a grid where 1 column is a combobox. The thing works just fine and the correct value is beeing sent through my ajax request, but after I edited the grid row, the combobox disappread and the value that comes into place is not the label, but the value.
editor: new Ext.form.field.ComboBox({
typeAhead: true,
lazyRender: true,
store: new Ext.data.ArrayStore({
fields: ['contact', 'contactLabel'],
data: [
[1,'Jan'],
[2,'Jeroen'],
[3,'Mattijs'],
[4,'Sven'],
[5,'Thomas'],
[6,'Yoran']
]
}),
valueField: 'contact',
displayField: 'contactLabel',
hiddenName: 'contact'
})
So what happens is that when I change the combobox to i.e.. "Thomas", the value of the cell becomes "5", instead of "Thomas". I thought that defining value/display fields would make a difference, but it does not.
Anyone that knows the answer?
I am not quite sure if I got you right. If so you will need a renderer for that. I guess the example below the code snipped should show you if you are meaning such a case.
// the renderer. You should define it within a namespace
var comboBoxRenderer = function(combo) {
return function(value) {
var idx = combo.store.find(combo.valueField, value);
var rec = combo.store.getAt(idx);
return (rec === null ? '' : rec.get(combo.displayField) );
};
}
// the edit combo
var combo = new Ext.form.ComboBox({
store: store,
valueField: "value",
displayField: "text"
});
See this full working example for both (cellEditing + rowEditing) JSFiddle ()
Here's the complete code
Ext.create('Ext.data.Store', {
storeId:'simpsonsStore',
fields:['name', 'email', 'phone', 'id'],
data:{'items':[
{"name":"Lisa", "email":"lisa#simpsons.com", "phone":"555-111-1224","id": 0},
{"name":"Bart", "email":"bart#simpsons.com", "phone":"555-222-1234","id": 1},
{"name":"Homer", "email":"home#simpsons.com", "phone":"555-222-1244","id": 2},
{"name":"Marge", "email":"marge#simpsons.com", "phone":"555-222-1254","id": 3}
]},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});
// the combo store
var store = new Ext.data.SimpleStore({
fields: [ "value", "text" ],
data: [
[ 0, "Option 0" ],
[ 1, "Option 1" ],
[ 2, "Option 2" ],
[ 3, "Option 3" ]
]
});
// the renderer. You should define it within a namespace
var comboBoxRenderer = function(combo) {
return function(value) {
var idx = combo.store.find(combo.valueField, value);
var rec = combo.store.getAt(idx);
return (rec === null ? '' : rec.get(combo.displayField) );
};
}
// the edit combo
var combo = new Ext.form.ComboBox({
store: store,
valueField: "value",
displayField: "text"
});
// demogrid
Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{header: 'Name', dataIndex: 'name', editor: 'textfield'},
{header: 'Email', dataIndex: 'email', flex:1,
editor: {
xtype: 'textfield',
allowBlank: false
}
},
{header: 'Phone', dataIndex: 'phone'},
{header: 'id', dataIndex: 'id', editor: combo, renderer: comboBoxRenderer(combo)}
],
selType: 'cellmodel',
plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
clicksToEdit: 1
})
],
height: 200,
width: 400,
renderTo: 'cell'
});
// demogrid
Ext.create('Ext.grid.Panel', {
title: 'Simpsons',
store: Ext.data.StoreManager.lookup('simpsonsStore'),
columns: [
{header: 'Name', dataIndex: 'name', editor: 'textfield'},
{header: 'Email', dataIndex: 'email', flex:1,
editor: {
xtype: 'textfield',
allowBlank: false
}
},
{header: 'Phone', dataIndex: 'phone'},
{header: 'id', dataIndex: 'id', editor: combo, renderer: comboBoxRenderer(combo)}
],
selType: 'rowmodel',
plugins: [
Ext.create('Ext.grid.plugin.RowEditing', {
clicksToEdit: 1
})
],
height: 200,
width: 400,
renderTo: 'row'
});
html
<div id="cell"></div>
<div id="row"></div>
Try:
data: [
{contact: 1, contactLabel: 'Jan'},
...
]

extjs gridpanel: ColumnModel becomes null when GridPanel window shows again

I defined a GridPanel with pre-configured ColumnModel and Store, and put this GridPanel in a Ext.Window; It works fine when this window shows, however, if I close it and show it again, the ColumnModel of GridPanel becomes null so that this GridPanel cannot correctly rendered.
UPDATED (all code)
var stSummary = new Ext.data.JsonStore({ //define the store for Summary_Grid
fields : [
{
name: 'recID'
}, {
name : 'name',
}],
data: []
});
var colModelSummary = { //define the ColumnModel for Summary_Grid
columns:
[
{
header : "ID",
width : 50,
sortable : true,
menuDisabled: true,
dataIndex : 'recID'
},
{
header : "Name",
width : 100,
sortable : true,
menuDisabled: true,
dataIndex : 'name'
}
]
};
var reportConfig = {
id : 'Report_Window',
width : 250,
floating : true,
style : {
opacity : 0.7,
},
title : "Report",
layout: 'fit',
items : [{
xtype: 'tabpanel',
id: 'Report_Tab',
height: 200,
activeTab: 1,
items:
[
{
xtype : 'grid',
store : stSummary,
colModel : new Ext.grid.ColumnModel(colModelSummary),
stripeRows : true,
id : "Summary_Grid",
title : "Summary at",
sm : new Ext.grid.RowSelectionModel({
singleSelect : true
}),
listeners: {
'beforerender': function() {
console.log(this.getColumnModel().getColumnCount());
}
}
},
{
xtype : 'form',
id : 'Report_Form',
title: 'Item Report',
frame : true,
labelAlign : 'left',
bodyStyle : 'padding:2px',
autoScroll: true,
layout : 'column',
items : []
}
]
}],
resizable : {
dynamic : true
}
};
var reportWindow = new Ext.Window(reportConfig);
reportWindow.show();
document.onclick = myClickHandler;
function myClickHandler() {
if(!Ext.getCmp('Report_Window')) {
var reportWindow = new Ext.Window(reportConfig);
}
Ext.getCmp('Report_Window').show();
}
});
and the error:
Uncaught TypeError: Cannot read property 'length' of undefined
Ext.grid.ColumnModel.Ext.extend.getColumnCount ext-all.js:11
I actually just copy pasted your code into my application. I added reportWindow.show() in the end - and it works! Not sure what could be wrong, can you show all code?
Please note that it might be a close/hide problem, do you recreate your window each time?
EDIT:
Try to set closeAction: 'hide' to your window configuration.
Check this for details:
http://docs.sencha.com/ext-js/3-4/#!/api/Ext.Window-cfg-closeAction
EDIT #2:
I tested your code again, and it works again! I only corrected several things like extra commas - my resharper suggested it. (It might cause problems in IE) Then I putted it into Ext.onReady - it works! Ext.version == '3.2.1'
Check the whole code:
Ext.onReady(function() {
var stSummary = new Ext.data.JsonStore({
//define the store for Summary_Grid
fields: [
{
name: 'recID'
}, {
name: 'name'
}],
data: []
});
var colModelSummary = {
//define the ColumnModel for Summary_Grid
columns:
[
{
header: "ID",
width: 50,
sortable: true,
menuDisabled: true,
dataIndex: 'recID'
},
{
header: "Name",
width: 100,
sortable: true,
menuDisabled: true,
dataIndex: 'name'
}
]
};
var reportConfig = {
id: 'Report_Window',
width: 250,
floating: true,
style: {
opacity: 0.7
},
title: "Report",
layout: 'fit',
items: [{
xtype: 'tabpanel',
id: 'Report_Tab',
height: 200,
activeTab: 1,
items:
[
{
xtype: 'grid',
store: stSummary,
colModel: new Ext.grid.ColumnModel(colModelSummary),
stripeRows: true,
id: "Summary_Grid",
title: "Summary at",
sm: new Ext.grid.RowSelectionModel({
singleSelect: true
}),
listeners: {
'beforerender': function() {
console.log(this.getColumnModel().getColumnCount());
}
}
},
{
xtype: 'form',
id: 'Report_Form',
title: 'Item Report',
frame: true,
labelAlign: 'left',
bodyStyle: 'padding:2px',
autoScroll: true,
layout: 'column',
items: []
}
]
}],
resizable: {
dynamic: true
}
};
var reportWindow = new Ext.Window(reportConfig);
reportWindow.show();
document.onclick = myClickHandler;
function myClickHandler() {
if (!Ext.getCmp('Report_Window')) {
reportWindow = new Ext.Window(reportConfig);
}
Ext.getCmp('Report_Window').show();
}
});

Resources