Rendering ExtJS 4+ MVC application in a html div - how-to?

后端 未结 4 1499
时光取名叫无心
时光取名叫无心 2021-02-04 18:03

All examples that I have found so far explain how to render ExtJS (4.2) MVC application within the \"viewport\", which in other words means full browser screen, and occupying wh

4条回答
  •  你的背包
    2021-02-04 18:33

    I liked Evan Trimboli's concise approach but I could not get it to work either (it also told me that MyContainer is not defined). However this approach worked...

    launch: function () {    
        Ext.create('widget.MyContainer', {
            renderTo: 'MyDiv'
        });
    }
    

    ...where 'widget.MyContainer' is the alias created inside the view itself, and provided I also did this up top:

    Ext.define('MyApp.Application', {
        extend: 'Ext.app.Application',
    
        name: 'MyApp',
    
        views: [
            'MyApp.view.MyContainer'
        ],
    ...
    

提交回复
热议问题