One year of programming in ExtJS and still cannot figure this simple thing out properly...
I have a master panel with charts ('MyApp.view.dashboard.MainPanel') which contains some functions.
Inside this main panel, there are second-level panels, which in turns contain the actual charts panels.
I need to make the REFRESH button of these charts call the functions of MainPanel.
Something like this in my dashboard.js:
Code:
Ext.define('MyApp.view.dashboard.BaseChart',{
xtype: 'basechart',
...
tools: [{
type: 'refresh',
tooltip: 'refresh',
callback: 'onChartRefreshClicked'
}]
}
Ext.define('MyApp.view.dashboard.MainPanel', {
...
mainPanelFunction: function(...) {
...
},
items: [{
//first subpanel
...
items: [{
//first chart
xtype: 'basechart',
...
}, {
//second chart
xtype: 'basechart',
...
}]
}, {
//second subpanel
...
In my dashboardcontroller.js:
Code:
Ext.define('MyApp.view.dashboard.ChartsController', {
...
onChartRefreshClicked: function(panel){
??????
}
What is the correct syntax inside onChartRefreshClicked to call mainPanelFunction???