Ext.Window
1 在一个Ext web应用中,在每一个用到Ext的程序页面中都必须引入ext的js和css等文件,因此我们定义了一个include.jsp文件,此文件的内容大致为:
jsp代码:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page session="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@page import="org.apache.commons.logging.Log,org.apache.commons.logging.LogFactory"%>
<anyxmlelement xmlns:fn="http://java.sun.com/jsp/jstl/functions" />
<%
request.setAttribute("path", request.getContextPath());
application.setAttribute("parameter",ParameterFactory.getColMap());
%>
<Script Language="javaScript" src="${path}/commons/commons.js"></Script>
<link rel="stylesheet" type="text/css" media="all" href="<c:out value="${path}" />/jsLibs/extJS/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" media="all" href="<c:out value="${path}" />/jsLibs/extJS/resources/css/xtheme-gray.css" />
<link rel="stylesheet" type="text/css" media="all" href="<c:out value="${path}" />/jsLibs/extJS/resources/css/fileuploadfield.css" />
<script type="text/javascript" src="<c:out value="${path}" />/jsLibs/extJS/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<c:out value="${path}" />/jsLibs/extJS/ext-all.js"></script>
<script type="text/javascript" src="<c:out value="${path}" />/jsLibs/extJS/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="<c:out value="${path}" />/jsLibs/extJS/ux/FileUploadField.js"></script>
<LINK href="${path}/commons/style.css" type="text/css" rel=stylesheet>
<Script LANGUAGE="JavaScript">
Ext.BLANK_IMAGE_URL = "<c:out value="${path}" />/jsLibs/extJS/resources/images/default/s.gif";
/**
*创建Ext.Window时,设置创建事件所在的window对象
*/
Ext.Window.prototype.setCreateWin=function(win){
this.createWin=win;
}
Ext.Window.prototype.getCreateWin=function(){
return this.createWin;
}
//取最上層EXT
function getTopExt(){
var topExt;
try{
topExt=top.Ext;
}catch(ex){
topExt=Ext;
}
return topExt;
}
</Script>
在每个具体的jsp页面,我们可以将此 include.jsp文件保护进来:
<%@ include file="/WEB-INF/view/include/include.jsp"%>
2 Ext.Window:
将此window创建在顶层页面作用域中。
var parExt = getTopExt();
var addWin = new parExt.Window({
id: 'marcInfoWin',
title: "物料新增",
width: 1000,
height: 600,
resizable: true,
maximizable: true,
modal: true,
html: '<iframe style="width:100%;height:100%;" frameborder="0" '+
'src="<c:out value="${path}"/>/marcInfo.htm?method=turnToModifyMarcInfoView&flag=add"></iframe>'
});
//将当前window设置为创建拖动窗口的window
addWin.setCreateWin(window);
addWin.show();
//取得创建的拖动窗口
var marcInfoWin = parExt.ComponentMgr.get('marcInfoWin');
//取得创建 拖动窗口的 window
var domWin = marcInfoWin.getCreateWin();
domWin.indexFun.callBack(marcInfObj);
分享到:
相关推荐
一个简单的Ext.Window中插入图片的例子,让您轻松掌握在Ext.Window中插入图片(照片)。
Ext.window的一个扩展组件SuperWin.js.可灵活自主随意定位,和显示模式;
从右下角动态弹出window,显示1分钟后自动隐藏,然后再弹出,类似MSN登录提醒。
EasyExt_003_第一个组件Ext.Window EasyExt_003_第一个组件Ext.Window
NULL 博文链接:https://oppovaan.iteye.com/blog/627655
Most configuration options are inherited from Ext.Window (see ExtJs docs). The added ones are: url - the url where to post uploaded files. base_params - additional post params (default to {}). ...
Ext.Window 通过DIV布局,通过DIV填充window内容,带Ext所需文件。
Ext.Panel API翻译 -------Window属性
环境:Window XP Sp2、Tomcat 6.0、MyEclipse 5.5、Ext 3.2 使用步骤: 1、下载解压缩之后,使用IDE导入工程 2、在MyEclipse中启动服务器 3、打开IE在地址栏输入:http://localhost:8080/ExtAjax/TestAjax.html 如果...
10、Ext.ux.window.EachDialog 11、Ext.ux.grid.property.Grid 12、Ext.ux.form.field.TinyMCE 13、Ext.ux.form.field.Grid 主页:https://github.com/harrydeluxe/extjs-ux 注明:在Extjs4.1上是可以使用的,Extjs...
第九章 Ext.Panel 面板控件、 Ext.window.Window 窗口控件、 Ext.container.Viewport 布局控件 72 一、面板控件 Ext.Panel 72 二、窗口控件 Ext.window.Window 74 三、布局控件 Ext.container.Viewport 77 第十章 ...
Ex4.0共2个压缩包特性,《ext js权威指南》 前 言 第1章 ext js 4开发入门 / 1 1.1 学习ext js必需的基础知识 / 1 1.2 json概述 / 3 1.2.1 认识json / 3 1.2.2 json的结构 / 3 1.2.3 json的例子 / 4 1.2.4 ...
this.Window.InitCenter = true; 51. Renamed TextMenuItem control to the MenuTextItem 52. GridPanel client API: submitData, getRowsValues has 1 argument only, config object 53. GenericPlugin: ...
3.2.7 Ext.window.MessageBox的其他功能 3.3 进度条组件介绍 3.3.1 认识Ext.ProgressBar 3.3.2 手工模式的进度条 3.3.3 自动模式的进度条 3.3.4 自定义样式的进度条样式 3.4 实现工具栏和菜单栏 3.4.1 认识...
3. ExtJs2.0学习系列(3)--Ext.Window 4. ExtJs2.0学习系列(4)--Ext.FormPanel之第一式 5. ExtJs2.0学习系列(5)--Ext.FormPanel之第二式 6. ExtJs2.0学习系列(6)--Ext.FormPanel之第三式(ComboBox篇) 7. ExtJs2.0学习...
ExtJS中窗口是由Ext.Window类定义,该类继承自Panel,因此窗口其实是一种特殊的面板Panel。窗口包含了浮动、可拖动、可关闭、最大化、最小化等特性。
Ext.ux.window.DetailMessageBox 带有可以折叠详细信息的对话框,该扩展组件是基于ExtJS5.1.1版本仿照MessageBox单例窗口编写。会有很多不完善的地方,将在以后的项目中或业余时间中进行修改。 部署扩展 将 ...
extend : 'Ext.Window', title : 'welcome!', initComponent : function() { this.items = [{ xtype : 'textfield', name : 'tfName', fieldLabel : 'Enter your name' }], this.callParent(arguments); } }); var ...
用法datetimePicker = new Ext.ux.touch.DateTimePicker({ useTitles: true, id: 'dt', value: { day: 23, month: 2, year: 2000, hour: 13, minute: 45 }, listeners: { "hide": function(picker) { window.alert&#...
JSP+EXT超强仿QQ聊天系统 WEBQQ