小编cra*_*ies的帖子

动态加载javascript

我在应用程序中使用了很多脚本,其中一些不需要加载应用程序,我想在可能之前加载它们,知道我的应用程序是用ExtJS编码的,并且使用了很多ajax调用

javascript extjs

7
推荐指数
1
解决办法
5946
查看次数

加载comboBox extjs的默认值

如何从我的json商店(远程)加载一个默认值到一个组合框,我试着在渲染组合之前加载商店,并使用setValue()我希望我的组合在商店中显示第一个结果plz告诉我正确的方法和thanx

javascript combobox extjs store

6
推荐指数
1
解决办法
3万
查看次数

从json store extjs获取记录

我有一个json存储加载,我需要从中获取一条记录.我用:getAt(index),find(),getById(),但没有结果.这是我的代码:

var appSettingReader = new Ext.data.JsonReader({     
                root: 'results',
              },[
                {name: 'id', type: 'int', mapping: 'id'},
                {name: 'projetId', type: 'int', mapping: 'projetId'},
                {name: 'resLevels', type: 'int', mapping: 'resLevels'},
                {name: 'maxResToLock',  type: 'int', mapping: 'maxResToLock'},
                {name: 'maxTimeToLock', type: 'int', mapping: 'maxTimeToLock'},
                {name: 'infosToPrint', type: 'string', mapping: 'infosToPrint'}
              ])

var appSettingStore = new Ext.data.Store({
                proxy: new Ext.data.HttpProxy({
                        url: 'inc/getSettings.php',
                        method: 'POST'
                    }),
                baseParams:{task: "app"}, 
                reader : appSettingReader,
                sortInfo:{field: 'id', direction: "DESC"}
               })

appSettingStore.load(); 
Run Code Online (Sandbox Code Playgroud)

此代码返回undefined:

console.log(appSettingStore.getAt(0));

console.log(appSettingStore.find("id","1")); 
Run Code Online (Sandbox Code Playgroud)

这是从服务器返回的json字符串: …

javascript json extjs store

3
推荐指数
1
解决办法
3万
查看次数

标签 统计

extjs ×3

javascript ×3

store ×2

combobox ×1

json ×1