Ext.js5下拉单选框—查询远程数据(27)
来源:互联网 发布:快递录入软件 编辑:程序博客网 时间:2024/05/03 17:25
view
/** * This example illustrates a combo box which querys a remote data source. * 这个例子用来模拟下拉框查找远程数据资源 */Ext.define('KitchenSink.view.form.combobox.RemoteQuery', { extend: 'Ext.form.Panel', xtype: 'remote-combo', title: 'Remote Query ComboBox', width: 500, layout: 'form', viewModel: {}, items: [{ xtype: 'fieldset', layout: 'anchor', items: [{ xtype: 'component', anchor: '100%', html: [ '<h3>Remote query mode</h3>', '<p>This ComboBox uses <code>queryMode: "remote"</code> ', 'to perform the query on a remote API which returns states ', 'that match the typed string.</p>' ] }, { xtype: 'displayfield', fieldLabel: 'Selected State', bind: '{states.value}' }, { xtype: 'combobox', reference: 'states', publishes: 'value', fieldLabel: 'Select State', displayField: 'state', anchor: '-15', store: { type: 'remote-states' }, // We're forcing the query to run every time by setting minChars to 0 设置minchars为0可以让查询运行 // (default is 4) minChars: 0, //store传递键入字符串使用的参数名,当ComboBox配置queryMode: 'remote'时。 如果显示设置为falsy值不会被发送,默认值:Defaults to: "query" queryParam: 'q', queryMode: 'remote' }] }]});
model
Ext.define('KitchenSink.model.State', { extend: 'KitchenSink.model.Base', fields: [ 'abbr', 'state', 'description', 'country' ]});
store
Ext.define('KitchenSink.store.RemoteStates', { extend: 'Ext.data.Store', alias: 'store.remote-states', model: 'KitchenSink.model.State', storeId: 'remote-states', proxy: { type: 'ajax', url: 'resources/data/form/states_remote.php', reader: { type: 'array', rootProperty: 'data' } }});
0 0
- Ext.js5下拉单选框—查询远程数据(27)
- Ext.js5表单—即时查询(结合Ext.Template和远程数据)(52)
- Ext.js5(自定义的下拉列表模板)(从服务器加载数据)(28)
- Ext.js5下拉框—简单下拉框(publishes)(26)
- Ext.js5表单—登录表单(40)
- Ext.js5表单—注册表单(42)
- Ext.js5树—基本树(54)
- Ext.js5用XML数据做的表(12)
- Ext.js5(关联数据插件)(SubTable)(23)
- Ext.js5表单—(triggers触发器)(baseCSSPrefix)(specialkey)利用Ext.js提供的框架创建自己的表单(查询表单)(51)
- Ext.js5表单文本—数字(24)
- Ext.js5表单文本—标签文本(33)
- Ext.js5表单—请联系我们(41)
- ext远程加载数据
- Ext.js5的表格插件—展开和冻结和Ext.XTemplate(14)
- Ext JS5 API 目录介绍&Ext类
- 【层级结构】Ext.js5视图模型和数据绑定(上)
- 【层级结构】Ext.js5视图模型和数据绑定(下)
- 编译Caffe时遇到error LNK2005: opencv_core300d.lib已经在 MSVCRTD.lib(MSVCR90D.dll) 中定义
- 设计模式——简单工厂模式
- spark-sql中文字符使用问题
- MD-5
- 趣味编程:从字符串中提取信息
- Ext.js5下拉单选框—查询远程数据(27)
- keras:安装于pyenv
- 趣味编程:从字符串中提取信息(参考答案 - 上)
- poj 1852 Ants 【思维】
- 趣味编程:从字符串中提取信息(参考答案 - 下)
- tomcat搭建https
- Touch ID指纹识别功能 iOS8
- EasyClient中DShow本地采集视频参数设置及可能出现的错误提示详解
- 您能看出这个Double Check里的问题吗?