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 ...
随机推荐
- typedef的使用2——定义函数
#include <stdio.h> #include <string.h> #pragma warning(disable:4996) //闲言碎语都先不要讲了,直接上函数吧 ...
- DROP--删除表
DROP TABLE table_name; 说明: 1.必须有表的权限 2.表不能有外键约束
- myeclipse连接数据库遇到的几个问题
1:无效的SQL URL: //将获取的参数插入数据库 Connection conn=null; PreparedStatement stat=null; ...
- Leetcode 242. Valid Anagram(有效的变位词)
Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = & ...
- JAVA问问
一.java中的类和方法 java是面向对象的 类就可以看做一个对象 属性是这个对象拥有什么 方法是这个对象可以做什么 Eg: 类:Person 属性:eyes mouth 方法:eat 解释: Pe ...
- ajax发送请求
首先创建XMLHttpRequest对象,利用此对象发送请求 主页面 <!doctype html> <html lang="en"> <head&g ...
- JAXB - Calling marshal
Only a handful of source code lines is required to make a JAXB Marshaller object write a document tr ...
- 将多维数组转换为支持curl提交的一维数组格式
/** * @desc 多维数组转化为支持curl提交数组 * @author lytian 2013-06-29 */ public function toPost(array $params = ...
- WPF嵌入百度地图完整实现
无论是做App还是web开发,很多都会用到地图功能,一般都会调用第三方的API实现地图功能!而正如国内的地图API提供方,基本上对Android.IOS和web开发提供了很完整的一套API,但是对于桌 ...
- [.Net MVC] 过滤器以及异常处理
项目:后台管理平台 意义:程序发布后,不应该对用户显示因程序出错和崩溃而出现的错误信息,采用统一友好的错误页面,并将错误信息记录到日志中供管理人员查看. 一.过滤器Filter Filter(筛选器) ...