///
var store12=new Ext.data.JsonStore({
//results 表示结果数
//rows 表示从后台传过来的JSON数据
data:{ "results": 2, "rows":[
{"id":1, "city": "suzhou", "areacode": "0512", "perincome": "2500" },
{"id":2, "city": "nanjing", "areacode": "025", "perincome": "2200" }]},
//自动加载(不能用store.load())
autoLoad:true,
totalProperty:"results",
root:"rows",
fields:[{name:'city',mapping:'city'},
{name:'areacode',type:'int'},
{name:'perincome',mapping:'perincome',type:'int'},
{name:'id',mapping:'id',type:'int'}
]
});
var bottomSearch12 = new Ext.form.ComboBox({
fieldLabel: 'Country Code',
name: 'country_code',
forceSelection: true,
listWidth: 200,
store: store12,
valueField: 'areacode',
displayField: 'city',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
selectOnFocus: true, //用户不能自己输入,只能选择列表中有的记录
allowBlank: false,
listeners: {
select: function() {
alert(this.value);
}
}
})
作者: 王德田 发表于 2011-04-02 13:39 原文链接
评论: 0 查看评论 发表评论
最新新闻:
· Spring.NET Visual Studio 2010 Extension 1.0.0(2011-04-08 08:50)
· 微软前工程师用谷歌地图建旅游搜索引擎(2011-04-08 08:49)
· 熊晓鸽:投资奇虎360回报率约50倍(2011-04-08 08:47)
· 永中科技创始人:永中office败于盗版 没输微软(2011-04-08 08:46)
· 惠普诉前高管非法窃取机密情报并提供给对手(2011-04-08 08:45)
编辑推荐:C#开发Android应用的必备——Mono for Android V1.0 发布
网站导航:博客园首页 我的园子 新闻 闪存 小组 博问 知识库
分享到:
相关推荐
ExtJs学习资料28-Ext.data.JsonStore数据存储器
在使用myeclipse过程中,我使用ajax同步请求传递参数到后台却出现中文乱码,这是我解决问题的代码,希望对您有所帮助
extjs4 对多种store数据 ,以多种方式绑定到界面上,以一例子以说明编写
conn.request({ success: function(response) { Ext.Msg.alert('info', response.responseText);...var ds = Ext.data.JsonStore({ url: 'xxx.jsp', root: 'root', fields: ['id','name','descn'] });
表格的数据存储器由Ext.data.Store定义,根据解析数据的不同,数据存储器可具体分为如下几种: JsonStore,SimpleStore,GroupingStore… 一个表格的基本编写过程: 1、创建表格列模型 var cm = new Ext.grid....
store: new Ext.data.JsonStore({ idProperty: 'VehicleNo', url: '../ajax/test.ashx, fields: ['VehicleNo', 'phoneNum'] }), id:'querynodesid', emptyText:'快速检索', hiddenName: 'VehicleNo', ...
store : new Ext.data.JsonStore({ url : contextPath + '/AutoComplete', root : 'root', baseParams : { limit : 20 }, fields : [ { name : 'value', mapping : 'value' },{ name:'name', mapping:'...
拿combobox的数据 代码如下: comboDS = new Ext.data.JsonStore({ url : ‘test.do’, fields : [{ name : ‘id’ }, { name : ‘display’ }] }); combobox定义 combobox 中的id必须要有,后面要跟据id取combobox值...
Extjs 通用查询功能 支持动态添加多个查询条件、定义逻辑关系,支持整形、浮点、字符串、日期、布尔值、自定义选择列表的录入,通过Ext.data.JsonStore可方便的与服务器交互。
表格的列信息由类Ext.grid.Column(以前是由Ext.grid.ColumnModel定义)、而表格的数据存储器由Ext.data.Store定义,数据存储器根据解析的数据不同分为JsonStore、SimpleStroe、GroupingStore等。 下面
表格的列信息由类Ext.grid.ColumnModel定义、而表格的数据存储器由Ext.data.Store定义,数据存储器根据解析的数据不同分为JsonStore、SimpleStroe、GroupingStore等。 我们首先来看最简单的使用表格的代码: 代码...
代码如下: Ext.onReady(function(){ //定义store var chartStore = new Ext.data.JsonStore({ root:’root’, fields:[ {name:’ne’,type:’string’},//网元 {name:’confine’,type:’int’},//阀值 {name:’bill...
NULL 博文链接:https://mr-cheney.iteye.com/blog/1172183
入门 EXT简介 Ext 2简述 EXT新手建议 怎么轻松地进入Ext的世界? 从零开始Ext 设置基础页 Javascript中的作用域(scope)是什么?(一) Javascript中的作用域(scope)是什么?...采用JsonStore的PropertyGrid 关联事件
store3 = new Ext.data.JsonStore({ autoDestroy: true, totalProperty : 'totle', url: 'service.do', storeId: 'myStore', root: 'data', fields : [ 'id', "name", "pw" ] }); var pagingToolbar = new Ext....
资源来自pypi官网。 资源全名:jsonstore-1.1.4.tar.gz
资源来自pypi官网。 资源全名:jsonstore-1.2.tar.gz
JSONStore:简单线程安全的内存JSON密钥存储支持后端持久化
开源项目-schollz-jsonstore.zip,Library for simple thread-safe in-memory JSON key-store with persistent backend
资源来自pypi官网。 资源全名:jsonstore-1.1.4-py2.7.egg