View Full Version : Creating a View from a Controller

14 Jun 2012, 1:52 AM
I am new to ExtJS(4.1) and now I try to make an application using the suggested MVC architecture. In order to create the needed things, I have to dynamically create a model. That is why I use events in order to trigger the creation of that model, the store and now a custom Panel. This Panel is defined as a view and on its creation I need a few parameters(the columns and the div where it should be rendered to). I have everything, except the View.
In my controller, I don't specify the needed view in the views array, because it shouldn't be instantiated from the beginning. Here I do the instantiation:

var list = Ext.widget('installBaseList', params);

and this is an extract form the view:

Ext.define("FI.view.InstallBaseList", {
extend: 'Ext.grid.Panel',
require: 'FI.store.InstallBaseStore',
title: 'List',

alias: 'widget.installBaseList',
//other config

When I run the apploication, I get this error:

name is undefined
parseNamespace(namespace=undefined) ext-all-debug.js (line 4486)

get(name=undefined) ext-all-debug.js (line 4594)

instantiate() ext-all-debug.js (line 4822)

instantiateByAlias() ext-all-debug.js (line 4804)

widget(name="installBaseList", config=Object { divId="container", columns=[0]}) ext-all-debug.js (line 5081)

(?)()ListCo... 6705404 (line 98)


if (name === from || name.substring(0, from.length) === from) { ext-all-debug.js (line 4486)

Please tell me how to fix it.

If it helps, I have also posted a similar question here:


but I didn't get any results.