How to call set or get a Controller's config property from a view?-Collection of common programming errors
I have a controller something like this:
Ext.define('DigitalPaper.controller.Documents', {
extend: 'Ext.app.Controller',
views: ['Documents'],
stores: ['Documents'],
models: ['Documents'],
config: {
defaultColumnSet: undefined
},....
I want to call the method getDefaultColumnSet or setDefaultColumnSet from the view. Is this possible?
I have tried with
Ext.app.Controller.getController('Documents');
But it doesn’t work!
Any suggests?
-
It’s not a good idea to call controller methods from a view. It’s possible, but if you’re trying to use MVC paradigm – I would avoid doing it.
What exactly are you trying to achieve?
Originally posted 2013-11-09 22:58:15.