Continui开发者_开发技巧ng the question here: Extjs 4 MVC loading a view from controller how do you load the created view into your viewport?
Here is what I did:
this.getViewportContent().insert(Ext.widget('templatecategorycreate'));
where getViewportContent() returns where I wanted to add that view to, but it does not work. Error was:
Uncaught TypeError: Cannot call method 'substring' of undefined
And the answer is as simple as:
this.getViewportContent().add(Ext.widget('templatecategorycreate'));
Can't believe I had to debug the whole extjs trace to get into this...
精彩评论