PDA

View Full Version : Getting an error while using Exporter



harjits
27 Dec 2012, 11:31 AM
I'm using the exporter functionality to export data from a grid to Excel. When my grid is loaded the 3rd time, I see this error

Ext.Button.Ext.extend.onDisableChange[/COLOR]ext-all-debug.js:31696 (http://localhost:9090/sentry-web/static/ext/ext-all-debug.js)Ext.Button.Ext.extend.onEnable[/COLOR]ext-all-debug.js:31688 (http://localhost:9090/sentry-web/static/ext/ext-all-debug.js)





Ext.extend.enable[/COLOR]ext-all-debug.js:11711 (http://localhost:9090/sentry-web/static/ext/ext-all-debug.js)
setLink[/COLOR]:9090/sentry-web/static/js/sentry/Exporter-all.js:159 (http://localhost:9090/sentry-web/static/js/sentry/Exporter-all.js)
EXTUTIL.Event.fire[/COLOR]ext-all-debug.js:310 (http://localhost:9090/sentry-web/static/ext/ext-all-debug.js)
]EXTUTIL.Observable.fireEvent[/COLOR]ext-all-debug.js:54 (http://localhost:9090/sentry-web/static/ext/ext-all-debug.js)
Ext.data.Store.Ext.extend.loadRecords[/COLOR]ext-all-debug.js:24557 (http://localhost:9090/sentry-web/static/ext/ext-all-debug.js)
Ext.extend.onReadext-all-debug.js:25780 (http://localhost:9090/sentry-web/static/ext/ext-all-debug.js)
(anonymous function)[/COLOR]ext-all-debug.js:25744 (http://localhost:9090/sentry-web/static/ext/ext-all-debug.js)
Ext.extend.handleResponse[/COLOR]ext-all-debug.js:4646 (http://localhost:9090/sentry-web/static/ext/ext-all-debug.js)
handleTransactionResponse[/COLOR]ext-base-debug.js:1887 (http://localhost:9090/sentry-web/static/ext/adapter/ext/ext-base-debug.js)
checkResponseext-base-debug.js:1935 (http://localhost:9090/sentry-web/static/ext/adapter/ext/ext-base-debug.js)
(anonymous function)ext-base-debug.js:922 (http://localhost:9090/sentry-web/static/ext/adapter/ext/ext-base-debug.js)





My code is as follows



if (parent.phoneGrid.store.getTotalCount() > 0) {
var exportButton = new Ext.ux.Exporter.Button({
component:parent.phoneGrid.gridPanel,
text:"Export to .xls" });
parent.phoneGrid.gridPanel.getTopToolbar().add(exportButton);
parent.phoneGrid.gridPanel.getTopToolbar().doLayout()
}




[/COLOR]

mitchellsimoens
29 Dec 2012, 9:09 AM
You may want to ask the author of the class.