PDA

View Full Version : Trouble getting row expander to work - ERROR Cannot call method 'insert' of undefined



macdoug1
23 Oct 2012, 5:11 PM
Anyone know what would cause this ? I've looked all over the forum and I haven't found anything that is helpful in solving this issue.


Ext.Loader.setPath('Ext.ux.RowExpander', './js/Ext.ux.RowExpander.js');Ext.define('AM.view.bundle-issues-grid' ,{
requires:['Ext.ux.RowExpander'],
extend: 'Ext.grid.Panel',
alias : 'widget.bundleissues',

store:'bundleissues-store',

enableLocking:true,
width:'100%',
height:'100%',
plugins:[{
ptype: 'rowexpander',
rowBodyTpl: new Ext.XTemplate(
'<p><b>Issues:</b> {issues}</p>',
{
formatChange: function(v){

}

})
}],
// collapsible:true,
animCollapse: false,
iconCls: 'icon-grid',
margin: '0 0 20 0',

initComponent: function() {
this.columns = [
{text: 'ULN', flex:1, dataIndex:'uln'},
{text: 'Unit Name', dataIndex:'unitname'},
{text: 'Origin', dataIndex:'origin'},
{text: 'POE', dataIndex:'poe'},
{text: 'POD', dataIndex:'pod'},
{text: 'Destination', dataIndex:'destination'},
{text: 'RLD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'rld'},
{text: 'ALD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'ald'},
{text: 'EAD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'ead'},
{text: 'LAD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'lad'},
{text: 'RDD', renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex:'rdd'},
{text: 'SQFT', dataIndex:'sqft'},
{text: 'SSF', dataIndex: 'ssf'},
{text: 'CCD', dataIndex:'ccd'},
{text: 'Bundle Name', dataIndex:'bundlename'}
];
this.callParent(arguments);
}
});




I've tried to debug it but it is not getting me anywhere. Any ideas?

scottmartin
24 Oct 2012, 4:45 AM
Have you narrowed down what is triggering the error?

Do you have the rowExpander in the correct path? ../ or js/
Is your store valid?
If you remove the custom template, do you still get the error?

Scott.

macdoug1
24 Oct 2012, 5:55 AM
Okay so I've checked the store and it is valid. It will load if I comment out line 163 in the RowExpander.js file. I also tried commenting out the custom template but still same issue. The only thing left is the path to the plugin. In your comment you have: is it in the correct path? ../ or js/ does it matter where the file is even if I have it loading with the 'Ext.Loader.setPath('Ext.ux.RowExpander', './js/Ext.ux.RowExpander.js'); ' I have a maven project that has the js folder under the webapp directory and in that folder I have the main app.js file and down from that I have the model, controller, view folders which contain the other files. I put the Ext.ux.RowExpander.js plugin in the js folder at the same level as the app.js and it is loading when using the above path. It just blows up when it hits line 163 in the RowExpander.js. Anyway more help is appreciated.

macdoug1
6 Nov 2012, 3:03 PM
Can anyone help point me to where this method is? It doesn't appear in the code so it must be calling something that needs to be included.