zombeerose
3 Apr 2008, 10:05 AM
I would like to know if there is a better way to implement what I have attempted.
I am extending several Ext components (Panel, Grid, etc) that are utilized in my application in order to centralize common functionality. For example, I want all of my grids to be framed and have the same loading message. I also want all my panels to be framed so I have the same property in that config.
MyGrid = Ext.extend(Ext.grid.GridPanel, {
...
frame: true,
loadMask: { msg: 'My custom loading message common for all components' }
...
});
Ext.reg('mygrid', MyGrid);
MyPanel = Ext.extend(Ext.Panel, {
...
frame: true
});
Ext.reg('mypanel', MyPanel);
Since the Ext.grid.GridPanel originally extends Ext.Panel, is there some way that I could extend MyGrid from MyPanel but still get the extra code that an Ext.grid.GridPanel would? Hopefully that made sense.
Thanks in advance.
I am extending several Ext components (Panel, Grid, etc) that are utilized in my application in order to centralize common functionality. For example, I want all of my grids to be framed and have the same loading message. I also want all my panels to be framed so I have the same property in that config.
MyGrid = Ext.extend(Ext.grid.GridPanel, {
...
frame: true,
loadMask: { msg: 'My custom loading message common for all components' }
...
});
Ext.reg('mygrid', MyGrid);
MyPanel = Ext.extend(Ext.Panel, {
...
frame: true
});
Ext.reg('mypanel', MyPanel);
Since the Ext.grid.GridPanel originally extends Ext.Panel, is there some way that I could extend MyGrid from MyPanel but still get the extra code that an Ext.grid.GridPanel would? Hopefully that made sense.
Thanks in advance.