Sencha Touch NestList 如何载入tree结构的数据
来源:互联网 发布:金源贷网络贷款 编辑:程序博客网 时间:2024/05/22 05:21
代码:
Ext.application({ name: 'Sencha', phoneStartupScreen: 'resources/loading/Homescreen.jpg', tabletStartupScreen: 'resources/loading/Homescreen~ipad.jpg', launch: function() { //The whole app UI lives in this tab panel Ext.Viewport.add({ xtype: 'tabpanel', fullscreen: true, tabBarPosition: 'bottom', items: [ {xtype: 'nestedlist', title: 'Blog', iconCls: 'star', cls: 'blog', //displayField: 'title',//useTitleAsBackText: false,//onItemDisclosure: true, store: { type: 'tree', /* fields: ['title', 'link', 'author', 'contentSnippet', 'content', { name: 'leaf', defaultValue: true }], */fields: ['id', 'name', 'description', 'items'], proxy: {type: 'ajax',url: 'resources/data/data.json',reader: {type: 'json',rootProperty: 'items'} } }, detailCard: { xtype: 'panel', scrollable: true, styleHtmlContent: true }, listeners: { itemtap: function(nestedList, list, index, element, post) { this.getDetailCard().setHtml(post.get('name')); } },getTitleTextTpl: function() {return '<div>后退{name}dsfdsffsds</div>';},getItemTextTpl: function(node) {return '<div><strong>{name}:</strong> <em>{description}</em></div>';} } }); } } ] } ] }); }});
原理为载入一个hasMany的json数据,list会自动的进行加载。
- Sencha Touch NestList 如何载入tree结构的数据
- Sencha Touch 载入base64格式的图片数据
- Sencha Touch 载入base64格式的图片数据
- sencha touch 2 nestlist中获得绑定store中值的办法
- 如何动态载入到sencha-touch的combobox(selectfield)中
- sencha-touch2.0控件nestlist的简单用法
- sencha touch 2.0 数据视图的使用
- 如何在sencha touch 生成模板的阶段获得json数据
- sencha touch 1.1中如何不用proxy 获得wcf传入的jsonp数据
- Sencha Touch 2.0官方指南:如何使用数据视图
- sencha-touch的使用
- Sencha Touch 的基础知识
- sencha-touch如何集成广告
- 通过.NET开发Sencha Touch的后台数据
- sencha touch 数据没有加载成功的原因
- sencha-touch-1.1如何动态更新panel的title
- 如何在sencha touch中修改placeHolder的颜色
- Sencha touch中Ext.List如何高度自适应的解决方法
- Oracle Application R12 (12.1.1) Download from edelivery.oracle.com
- 十五周任务1:窗口启蒙(计算三角形周长和面积)
- Sencha Touch 载入base64格式的图片数据
- Jquery ajax参数设置
- 1: 上山拜师--ARM简介
- Sencha Touch NestList 如何载入tree结构的数据
- sencha touch 2中list如何动态添加或移除一个button
- VC++实现视频压缩编码标准 MPEG-4
- sencha touch 2 nestlist中获得绑定store中值的办法
- Tomcat 主目录与虚拟目录的配置
- sencha touch 2中判断游览器是否包含webkit的方法
- Mysql 100句
- 单例模式
- sencha touch 2制作滑动DataView(无缝list)