制作可刷新的side bar rest wcf 数据源(sencha2.0项目)
2011-11-08 18:35
344 查看
Ext.application({ name: 'Sencha', launch: function () { var tpl = new Ext.XTemplate( '<tpl class="contact2">{MetricName}</tpl></br><tpl class="contact2">{HostName}</tpl><tpl if="StatusId > 1"><img style="float:right;padding-right:50px" src="/image/notification_error_meitu_1.jpg"/></tpl><tpl if="StatusId < 2"><img style="float:right;padding-right:50px" src="/image/error.gif"/></tpl>' ); Ext.regModel('Tweet', { fields: [{ name: 'MetricId', type: 'int' }, { name: 'HostName', type: 'string' }, { name: 'MetricName', type: 'string' }, { name: 'ParameterId', type: 'int' }, { name: 'StatusId', type: 'int' }, { name: 'UserDomain', type: 'string' }, { name: 'ParentNodeId', type: 'int' }, { name: 'NodeId', type: 'int' }, { name: 'HasChildren', type: 'int' }] }); var store = new Ext.data.Store({ model: 'Tweet', proxy: { url: 'http://localhost:8080/exampleJsonpService/Nodes', type: 'jsonp', extraParams: { userName: 'admin', userDomain: 'admin' }, reader: { root: '' } } }); store.getProxy(); store.read(); Ext.create('Ext.Container', { fullscreen: true, layout: 'hbox', items: [ { xtype: 'toolbar', docked: 'top', height: 50, scrollable: { direction: 'horizontal', indicators: false }, items: [ { ui: 'back', text: 'Back', handler: function () { alert("dfdsf"); } }, { text: 'Default' }, { ui: 'round', text: 'Round' }, { xtype: 'spacer' }, { xtype: 'segmentedbutton', items: [ { text: 'Option 1' }, { text: 'Option 2', pressed: true }, { text: 'Option 3' } ] }, { xtype: 'spacer' }, { ui: 'action', text: 'Action' }, { ui: 'forward', text: 'Forward' }, { xtype: 'segmentedbutton', allowMultiple: true, items: [ { text: 'Toggle 1', pressed: true }, { text: 'Toggle 2', pressed: true }, { text: 'Toggle 3' } ] } ] }, { xtype: 'list', disclosure: true, onItemDisclosure: { scope: 'test', handler: function (record, btn, index) { store.getProxy().url = 'http://localhost:8080/exampleJsonpService/ChildNodes?parentNodeId=' + record.get('NodeId'); store.load(); } }, itemSelector: '.tweet', itemTpl: tpl, store: store, flex: 1 }, { xtype: 'panel', html: 'message preview', flex: 2 } ] }); } });
相关文章推荐
- (转)VS2010在制作Setup项目的时候没有.NET 2.0的先决条件发行包
- SpringSide 部署showcase项目出现 JAX-RS (REST Web Services) 2.0 can not be installed错误!
- vue2.0基于vue-cli,element-ui饿了么vue前端开源项目制作vue的树形table,treeTable
- MVC项目开发中那些用到的知识点(WCF Rest在MVC项目中的两种调用方式)
- 项目中基于Rest的Wcf服务发布以及iBatisNet框架的使用(上)
- Maven学习总结(35)——Maven项目错误 JAX-RS (REST Web Services) 2.0 can not be installed问题
- 基于.NET 2.0的GIS开源项目SharpMap分析手记(十四):ASP.NET2.0实现无刷新客户端回调的Callback机制及例子代码下载
- Windows Communication Foundation and RESTful Web Services Primer(教你制作rest wcf)
- 项目中基于Rest的Wcf服务发布以及iBatisNet框架的使用(下)
- 基于.NET 2.0的GIS开源项目SharpMap分析手记(十一):SharpMap影像准备——基于ERDAS的GEOTIFF图像生产过程
- sencha touch 入门系列 (三)sencha touch 项目创建
- 在WCF中使用REST时,如何去掉URL中的.svc后缀
- vue2.0项目实战(1)---工具
- 在Asp.net 2.0 中禁用页面缓存解决页面刷新(重新加载数据)的问题
- Wcf 第一个项目
- 重温WCF之WCF传输安全(十三)(1)前期准备之证书制作(转)
- 【转】 VS2005 ASP.NET2.0安装项目的制作(包括数据库创建、站点创建、IIS属性修改、Web.Config文件修改)
- Sencha Touch 快速入门2.0 第三章 布局(2) Card布局
- 将本地web项目发布到ubuntu上并运行 第一个本地的.net core2.0项目
- Show Sidebar on Lotus iNotes startup