View Full Version : [OPEN]Ext.Controller calls 'render' with wrong arguments

2 Mar 2011, 2:21 AM
On 2010-09-07 Ed changed the parameters of the Ext.Controller render() method from (viewName, config) to (config, target).

1. The API docs for the method were not corrected.
2. The index(), edit() and build() methods still use the old parameters, so they will fail.

Are you planning on re-adding default support for Model editing to Ext.Controller or should all model related methods be removed?

Other issues:
3. The control() method references undefined properties 'isView' and 'refs', so it's useless.
4. The render() method assumes that a profile is an Ext.Profile instance, but it's just a simple String. This means that the method will fail if you create an application with profiles before the controller.
5. The render() method uses createByAlias without a 'widget.' prefix. It should be using:

view = Ext.create(config);

IMHO Ext.Controller needs a complete rewrite.

21 Aug 2011, 2:00 PM
I have spent hours trying to find examples of the correct use of Ext.Controller.control() and finally looked at the source to find the isView value which is never set by any Sencha code.

This definitely required attention.

The potential to have a controller perform the bindings between UI components and actions seams to be a valid pattern that will create more readable code and permit the use case where several controllers may listen to the same UI event at different times in the application lifecycle.