2012年11月1日

sencha touch2 如何修改MessageBox 按钮的文字

摘要: YESNO = [ { text: '否', itemId: 'no' }, { text: '是', itemId: 'yes', ui: 'action' } ];Ext.MessageBox.YESNOCANCEL=[{text: 'Cancel', itemId: 'cancel'}, {text: 'No', itemId: 'no'}, {text: 'Yes', itemId: 'yes', ui:  阅读全文

posted @ 2012-11-01 10:21 一青鸟一 阅读(268) 评论(0) 推荐(0) 编辑

2012年10月19日

sencha touch2 如何在control层给panel应用XTemplate模版,并将store中的数据加载到模版里

摘要: model层设置相关字段。Ext.define("LYT.model.sceneryDetail", { extend: 'Ext.data.Model', config: { fields: ["id","title","content"] }});store层引用model并设置代理Ext.define("LYT.store.sceneryDetail", { extend: 'Ext.data.Store', config: { model: "L 阅读全文

posted @ 2012-10-19 23:41 一青鸟一 阅读(1947) 评论(0) 推荐(0) 编辑

2012年10月18日

sencha touch2 中 如何在控制层中给组件panel注册tap事件

摘要: 正常sencha touch2中,组件panel是没有tap事件的。我们需要用组件的初始化事件,间接进行绑定,代码如下:Ext.define("LYT.controller.Main", { extend: 'Ext.app.Controller', config: { refs: { Panel: '#Panel'//指定panel的引用 }, control:{ Panel: { initialize: function(component, options) ... 阅读全文

posted @ 2012-10-18 13:51 一青鸟一 阅读(813) 评论(0) 推荐(0) 编辑

sencha touch2 如何在control层控制store中的代理进行传参查询

摘要: store层Ext.define("LYT.store.sceneryDetail", { extend: 'Ext.data.Store', config: { model: "LYT.model.sceneryDetail", proxy: { type: "ajax", url: "sceneryDetailData.asp", method: "GET", extraParams: { id:1 }, reader: { type: "js... 阅读全文

posted @ 2012-10-18 13:31 一青鸟一 阅读(259) 评论(0) 推荐(0) 编辑

导航