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 ...
随机推荐
- Linux 系统下原版 texlive 2016 的安装与配置
尽管大部分常见的linux系统的包管理器内都会包含texlive,然而最好还是安装TUG发布的原版texlive.这是由于:1,软件仓库内的texlive通常版本较陈旧:2,由于版权因素一些tex宏包 ...
- [转]Oracle字符串拼接的方法
本文转自:http://www.blogjava.net/liuwuping12064915/archive/2011/06/27/353096.html 和其他数据库系统类似,Oracle字符串连接 ...
- spark向量、矩阵类型
先来个普通的数组: scala> var arr=Array(1.0,2,3,4) arr: Array[Double] = Array(1.0, 2.0, 3.0, 4.0) 可以将它转换成一 ...
- c# xml 解析取值
//字符串 string result = "<?xml version=\"1.0\" encoding=\"utf-8\"?>< ...
- C#学习笔记6:各种字符串问题
1.字符串 逐字字符串字面量:字符串前加@,不仅将反斜杠当做普通字符来处理,而且还会逐字解释所有空白字符. 如: Class Triangle { Static void Main() { Syste ...
- ios llvm and clang build tools
1. 使用 libclan g或 clang 插件 包括( libclang 和 Clangkit) 备注: Clangkit,它是基于 clang 提供的功能,用 Objective-C 进行封装 ...
- JavaScript高级程序设计(十):数组类型
先导: 访问对象属性使用的都是点表示法.另外,我们还可以使用方括号表示法来访问对象的属性.在使用方括号的时候,应该将要访问的属性以字符串的形式放到方括号中.这两种方法没有什么区别.但是方括号的优点是可 ...
- JAVA操作LDAP总结
一.LDAP概念 LDAP的全称为Lightweight Directory Access Protocol(轻量级目录访问协议), 基于X.500标准, 支持 TCP/IP. LDAP目录为数据库, ...
- Java实战之03Spring-03Spring的核心之AOP(Aspect Oriented Programming 面向切面编程)
三.Spring的核心之AOP(Aspect Oriented Programming 面向切面编程) 1.AOP概念及原理 1.1.什么是AOP OOP:Object Oriented Progra ...
- HDU 1069 Monkey and Banana(动态规划)
Monkey and Banana Problem Description A group of researchers are designing an experiment to test the ...