小编ras*_*han的帖子

ExtJS控制器探测器.未捕获的TypeError:Object [object Object]没有方法'setSortState'

T使用ExtJS4.0.1,MVC架构编写代码.当我开发主要表单时,我遇到了网站搜索扩展的问题.

当我试图在控制器中创建新的小部件时,我需要在子面板中渲染结果.所以当我编写示例代码时,我会遇到以下问题:

**Uncaught TypeError: Object [object Object] has no method 'setSortState'**
Run Code Online (Sandbox Code Playgroud)

我无法理解为什么它会给出错误信息.我需要一些帮助来解决这个问题.

下面我想展示我的代码:

//Panel which is showing to user

    Ext.define('Semantics.view.main.menuView', {
        extend: 'Ext.panel.Panel',
        layout: 'fit',
        alias: 'widget.Menu',
        title: "",
        tbar: [
            {
//search field
                        name:'mainSearchText',
                        id:'mainSearchText',
                        xtype: 'textfield',
                        defaultValue: 'Search',
                        height: 20
            },
            {
                name:'mainSearchButton',
                id:'mainSearchButton',
                xtype: 'button',
                text: 'Find',
                height: 20
            }
        ]
    });


//controller for search request
    Ext.define('Semantics.controller.main.mainController', {
        extend: 'Ext.app.Controller',
        views: ['main.menuView','mainSearch.MainSearchResultForm'],
        refs: [
            { ref: 'menuPanel', selector: 'Menu' },
            { ref:'mainSearchText',selector:'#mainSearchText'},
            {ref: 'mainSearchForm',selector:'#mainSearchForm'},
            {ref:'MainSearchGrid',selector:'#MainSearchGrid'}
        ],

        init: …
Run Code Online (Sandbox Code Playgroud)

javascript ajax json extjs4

2
推荐指数
1
解决办法
3394
查看次数

标签 统计

ajax ×1

extjs4 ×1

javascript ×1

json ×1