sencha touch mvc
controller:
Ext.define('MyApp2.controller.MyController1', {
extend: 'Ext.app.Controller', config: {
control: {
"#image2": {
tap: 'onImageTap'
}
}
}, onImageTap: function(image, e, eOpts) {
console.log('img2 tap');
} });
view:
Ext.define('MyApp2.view.MainView', {
extend: 'Ext.carousel.Carousel',
alias: 'widget.mainview', requires: [
'Ext.Panel',
'Ext.Label',
'Ext.Img'
], config: {
itemId: 'mainView',
items: [
{
xtype: 'panel',
itemId: 'panel1',
items: [
{
xtype: 'label',
centered: true,
html: 'Panel 1',
itemId: 'label1'
},
{
xtype: 'image',
height: 201,
id: 'image1',
itemId: 'image1',
src: 'images/sencha.png'
}
]
},
{
xtype: 'panel',
itemId: 'panel2',
items: [
{
xtype: 'label',
centered: true,
html: 'Panel 2',
itemId: 'label2'
},
{
xtype: 'image',
height: 201,
id: 'image2',//reference this id to attach event handler
itemId: 'image2',
src: 'images/sencha.png'
}
]
},
{
xtype: 'panel',
itemId: 'panel3',
items: [
{
xtype: 'label',
centered: true,
html: 'Panel 3',
itemId: 'label3'
},
{
xtype: 'image',
height: 201,
itemId: 'image3',
src: 'images/sencha.png'
}
]
},
{
xtype: 'panel',
itemId: 'panel4',
items: [
{
xtype: 'label',
centered: true,
html: 'Panel 4',
itemId: 'label4'
},
{
xtype: 'image',
height: 201,
itemId: 'image4',
src: 'images/sencha.png'
}
]
}
]
} });
sencha touch mvc的更多相关文章
- Sencha Touch MVC 中 store 的使用
I have a UserStore that I want to load after succesful login of a user. I can't get this to work i.e ...
- 跟我一起玩转Sencha Touch 移动 WebApp 开发(一)
1.目录 移动框架简介,为什么选择Sencha Touch? 环境搭建 创建项目框架,框架文件简介 创建简单Tabpanel案例 自定义图标的方式 WebApp产品测试和发布 HTML5离线缓存 发布 ...
- Sencha Touch+PhoneGap打造超级奶爸之喂养记(一) 源码免费提供
起源 非常高兴我的宝宝健康平安的出生了.对于初次做奶爸的我,喜悦过后,面临着各中担心,担心宝宝各项指标是否正常.最初几天都是在医院待着,从出生那一天开始,护士妹妹隔一段时间就会来问宝宝的喂奶,大小便, ...
- jQuery Mobile和Sencha Touch哪个更适合你?
纯粹的总结一下移动web开发框架,移动web开发框架有jQuery Mobile .Sencha Touch等等,他们都来源于web开发,是成熟的框架,jQuery Mobile出自于jQuery家族 ...
- (转)Sencha Touch和jQuery Mobile的比较
原文:http://extjs.org.cn/node/664 Sencha Touch和jQuery Mobile的比较 Posted 周三, 08/07/2013 - 10:07 by admin ...
- html5外包—长年承接html5外包业务:《Sencha Touch权威指南》下载
<Sencha Touch权威指南>内容简介:如何才能全面而透彻地理解和掌握移动应用开发框架Sencha Touch并开发出令人心动的移动应用?<Sencha Touch权威指南&g ...
- Sencha Touch 和 jQuery Mobile 的比较
Sencha Touch 和 jQuery Mobile 的比较 英文原文:Sencha Touch vs jQuery Mobile 标签: Sencha Touch jQuery Mobile 1 ...
- 跟我一起玩转Sencha Touch 移动 WebApp 开发1
跟我一起玩转Sencha Touch 移动 WebApp 开发(一) 1.目录 移动框架简介,为什么选择Sencha Touch? 环境搭建 创建项目框架,框架文件简介 创建简单Tabpanel案例 ...
- sencha touch 入门学习资料大全(2015-12-30)
现在sencha touch已经更新到2.4.2版本了 重新整理一下资料 官方网站:http://www.sencha.com/products/touch/ 在线文档:http://docs.sen ...
随机推荐
- Android_AutoCompleteTextView,MultiAutoCompleteTextView
XML布局文件 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:an ...
- iOS应用程序安全
iOS应用程序安全http://pan.baidu.com/s/1hqDnmXe
- php使用mysql_query查询超大结果集超内存的解决方法
再使用mysql_query查询超大结果集的时候会出现超出内存限制的致命错误,这是因为mysql_query采用的是查询全部结果然后把结果集全部缓存到内存中的方式. mysql的查询还提供了另外一种查 ...
- 解决闪光灯代码在Nexus5上面打不开的问题
参考:http://blog.csdn.net/cy524563/article/details/41545387 关键在于: int textureId = 0;whyCamera.setPrevi ...
- gVim多标签页
我们一般使用的文本编辑器,如:editplus.ultraEdit等都是支持多标签页的,可以同时打开多个文件,方便切换,以前gVim只能打开多个窗口,或者一个窗口切出多个窗口来编辑,自从7.0以后Vi ...
- c#中字符串显示上标和下标解决办法
由于工作的需求,需要在word中插入带入带有上标和下标的字符串,比如这样的一个字符串:SO₄²⁻(mg/L).在网上搜了好久,终是摸索出点思路. 解决办法:使用转义字符加Unicode的HexEnti ...
- spring3.2.0与mybatis3.2.7整合出错--Failed to read candidate component class--nested exception is java.lang.IllegalArgumentException
错误信息如下: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate com ...
- xxx is not in the sudoers file.This incident will be reported.的解决方法
1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去. 2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers 3.编辑sudoers文件vi /etc/sud ...
- 第一次使用并配置Hibernate
1. 环境配置 1.1 hiberante环境配置 hibernate可实现面向对象的数据存储.hibernate的官网:http://hibernate.org/ 官网上选择hibernate OR ...
- php 文件缓存
http://www.oschina.net/code/snippet_162279_6098 <?php class cache { private static $_instan ...