PDA

View Full Version : Setting Filter on PieChart's Store after reload throws exception 1009 NSObject



shizny
5 Sep 2010, 8:26 AM
Hello,

I'm trying to reload a jsonstore that populates a piechart. I've got a on load event handler on the jsonstore that sets the filter value for the store. On the first load, everything works great, but it I reload the store (hit the server) and re-assign the filter I get the exception. Here is my code. Can somebody help; pulling out my hair on this.

function pieChartDataLoaded (store, records, options) {
store.filter('CURRENTFILTER', pieChartStoreFilter);
}

works on the initial load, and then fails when I hit the same function after a reload call (which I assign params to).

VinylFox
5 Sep 2010, 4:16 PM
What's the exception message, and where is 'pieChartStoreFilter' defined?

shizny
5 Sep 2010, 10:40 PM
var pieChartStore = new Ext.data.JsonStore({
url: ('/components/RevenueSplitsByPartnership.cfc?method=getRevenueByPartnership&returnFormat=json'),
root: 'ROWS',
fields: ['VALUE','LABEL','CURRENTFILTER', 'FORWARDFILTER', 'BACKWARDFILTER']
});

uncaught exception: Error calling method on NPObject! [plugin exception: "TypeError: Error #1009: Cannot access a property or method of a null object reference."].

Line 0

When I reload the dataset from the cfc I pass in params like so.

pieChartStore.reload({'params':params});