ExtJS 4.x 第二搞 窗口(Window)
来源:互联网 发布:ubuntu 163源 编辑:程序博客网 时间:2024/05/02 03:48
停了好长近两个月份的ExtJS 4,今天重新开始,搞个窗口Hello World !
测试的JSP:
<%@page contentType="text/html" pageEncoding="UTF-8"%><!DOCTYPE html><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>窗口测试 1 </title> <jsp:include page="../include/ext-core-top.jsp" flush="true"> <jsp:param value="../" name="basePath" /> </jsp:include> <script type="text/javascript" src="win1.js"></script> </head> <body> <h1>Hello World!</h1> </body></html>../include/ext-core-top.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" type="text/css" href="${param.basePath}/ext-4.1/resources/css/ext-all.css" /><script type="text/javascript" src="${param.basePath}/ext-4.x/bootstrap.js"></script><link rel="stylesheet" type="text/css" href="${param.basePath}/style/main.css" /><link rel="stylesheet" type="text/css" href="${param.basePath}/style/icon-all.css" />
win1.js/* * To change this template, choose Tools | Templates * and open the template in the editor. */Ext.onReady(function(){ console.warn("Hello","Window one"); //firebug调试语句,未装会报错 /*定义一个窗口 名称Win,My包下 */ Ext.define('My.Win',{ extend:'Ext.window.Window', title:'My Win Test', width:440, height:280 }); /*定义一个窗口,继承My.Win,后面会实例一下,再直接show出来*/ Ext.define('My.Win.Reg',{ extend:'My.Win', statics:{ speciesName:'Snow Leopard' } }); /**定义窗口 用按钮show出来*/ var myWin = Ext.create('Ext.window.Window', { title: 'Hello', height: 200, width: 400, layout: 'fit', modal:true,//模态窗口 closeAction:'hide',//关闭方式隐藏 fbar: [//下部给几个按钮 { type: 'button', text: 'Button 1' },{ type: 'button', text: 'Button 2' } ], items: { // Let's put an empty grid in just to illustrate fit layout xtype: 'grid',//子组件grid border: false, columns: [{ header: 'World'//列头 }], // One header just for show. There's no data, store: Ext.create('Ext.data.ArrayStore', {}) // A dummy empty data store } }); var cac = new My.Win.Reg();//实例化窗口 cac.show(); /*页面加个按钮,show出窗口来*/ Ext.create('Ext.Button',{ renderTo:Ext.getBody(), width:128, text:'show Window', handler:function(){ myWin.show(); } });});
- ExtJS 4.x 第二搞 窗口(Window)
- ExtJS 4.x 第三搞 Tree + Struts2.x
- ExtJS 4.x 第一搞,经典的Hello World !!!
- ExtJS 4.x 第四搞 定义和加载类
- Extjs-弹出窗口 Ext.Window
- Extjs:Window之窗口创建
- ExtJS:学习笔记五:window窗口-登陆
- EXTJS 窗口Ext.Window()学习笔记
- Xnest窗口中的X-Window
- 第二十四章、 X Window 配置介绍
- 第二十四章、 X Window 設定介紹
- 第二十四章、 X Window 配置介绍
- X-Window窗口管理程序图标大搜集
- X Window 系统的窗口显示原理
- X Window 系统的窗口显示原理
- X Window 系统的窗口显示原理
- X Window 系统的窗口显示原理
- Extjs 例子:下拉菜单combobox 窗口window 树tree
- Android开发之手势识别
- Hbase Web Based UI
- 无题
- Android日记之2012/01/03
- Windows 命令行基础
- ExtJS 4.x 第二搞 窗口(Window)
- Symbol __stdout multiply defined
- 在 Linux 系统中安装Load Generator ,并在windows 调用
- 学习心得:第三章,继承总结
- 我的2011--衣带渐宽终不悔,为伊消得人憔悴
- 一南京程序员的价值思考与建构
- Linq to Visual Tree-可视化树的类Linq查询扩展API
- c#构造器的一点理解(三)
- BAT语法