1. var msgTip = '';   // 一定要定义在使用前,且定义为全局变量
  2. /--------------------------------store---------------------------------------------------------------//
  3. window.panelStore5 = Ext.create('Ext.data.Store', {
  4. fields:[{name:'name'},{name:'preStatics',type:'int'},'mypercent'],
  5. proxy: {
  6. type: 'ajax',
  7. url: extPath+'/center!getDetailByType.action?random='+new Date().getTime()+''+'&type=5',
  8. reader: {
  9. type: 'json',
  10. root: 'humresData',
  11. totalProperty: 'totalCount'
  12. }
  13. },
  14. autoLoad: false,
  15. sorters:[{
  16. property:"name",
  17. direction:"asc"
  18. },{
  19. property:"preStatics",
  20. direction:"asc"
  21. }],
  22. listeners:{
  23. beforeload:function(store,records,successful,operation,opts){
  24. msgTip = Ext.MessageBox.show({
  25. title:'提示',
  26. width : 250,
  27. msg:'页面统计信息刷新中,请稍后...',
  28. buttons: Ext.Msg.OK
  29. });
  30. },
  31. load:function(store,records,successful,operation,opts){
  32. if(successful){
  33. Ext.Msg.alert('提示','数据加载成功!');
  34. msgTip.hide();
  35. }else{
  36. Ext.Msg.alert('提示','数据加载失败!');
  37. msgTip.hide();
  38. }
  39. }
  40. }
  41. });
  1. 服务器 返回数值 类似:{ success:true,humerdata:{name:'andy',password:123123} } //humerdata 为root

2.store 遍历二种方式

stroe.each(function(rec){

alert(rec.get('name'));//name 为fields 字段

or: alert(rec.data.name)//name 为fields 字段

})

最新文章

  1. 【译】Spring 4 @Profile注解示例
  2. RestoreDirectory 引起的BUG
  3. ecshop去掉“云服务中心”或者是“模板堂知识库”
  4. Swing(一):JFrame框架窗体
  5. Caffe-windows上训练自己的数据
  6. blockUI
  7. int.TryParse 与 int.Parse 的区别
  8. ASP.NET MVC:01理解MVC模式
  9. ConcurrentHashMap源码分析
  10. Github+Hexo,搭建专属网站
  11. php的数据访问和封装运用
  12. Chrome浏览器扩展开发系列之九:Chrome浏览器的chrome.alarms.* API
  13. JAVA中java.util.Date、java.sql.Timestamp和String之间的互相转换
  14. 三种方式打印杨辉三角形(JAVA实现)
  15. jqgrid 时间戳转换成日期格式
  16. 【代码笔记】Web-ionic tab(选项卡)
  17. openssl版本升级操作记录【转】
  18. c++ getline()和get()的区别
  19. tomcat运行内存溢出问题
  20. 级联sql

热门文章

  1. 关于MySql中的varchar类型
  2. 利用JavaScript函数对字符串进行加密
  3. WinPhone学习笔记(二)——页面外观剖析
  4. Zookeeper安装,Zookeeper单机模式安装
  5. 点我吧工作总结(技术篇) Velocity
  6. 项目总结笔记系列 wsTax KT Session1
  7. ahjesus可供C#使用的ip地理位置查询插件
  8. Nodejs与ES6系列4:ES6中的类
  9. 12款响应式的 jQuery 旋转木马(传送带)插件
  10. JS去掉首尾空格 简单方法大全(原生正则jquery)