0

Continuing 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

Community
  • 1
  • 1
jaycode
  • 2,926
  • 5
  • 35
  • 71

1 Answers1

1

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...

jaycode
  • 2,926
  • 5
  • 35
  • 71
  • And it allways had been... The method to add components to an existing component is add, where did you get insert from? – VoidMain Nov 16 '11 at 14:07