//Define the parameters required by the window call method to pass in the JSP
functionGetWindow (obj,obj1,obj2,obj3,obj4,obj5,obj6,obj7,obj8,obj9) {Ext.define (' Zjfxjk.institutionsLib.jgjs.editPanel ', {extend:' Ext.window.Window ', layout:' Border ',//border layout alias:' EDITPANEL_JG ',//define the alias of the component, you can directly pass in the Create component maximizable:true,//maximized, maximized JSP page width and height to do adaptive changesID: ' EDITPANEL_JG ', width:$ (' #homeCenterTab '). Width () *0.9, height:$ (' #homeCenterTab '). Height () *0.9, modal:true,//window background blur not operable title:‘‘,//iconcls: ' Icon-window ',Closable:true,//Can close constrain:true,//force component to initcomponent inside window:function() {//define sub-components This. items=[ This. Getplanpanel ()];//, This.getflowpanel () This. Callparent (); }, Getplanpanel:function(){ if(! This. Planpanel) { This. Planpanel=ext.create (' flowpanel_jg_jsp '); } return This. Planpanel; }, Getflowpanel:function(){ if(! This. Flowpanel) { This. Flowpanel=ext.create (' FLOWPANEL_JG '); } return This. Flowpanel; }, });//frameheight=$ (' #homeCenterTab '). Height () *0.8-166;//framewidth=$ (' #homeCenterTab '). Width () *0.8; //panel that embeds JSP pages, custom componentsframewidth=$ (' #homeCenterTab '). Width () *0.9; Frameheight=$ (' #homeCenterTab '). Height () *0.9-80; Ext.define (' Zjfxjk.institutionsLib.jgjs.flowPanel_jsp ', {extend:' Ext.tab.Panel ', Width:framewidth, Height:frameheight, border:false, Region:' Center ', ID:"Jgflowpanel_jsp", alias:' Flowpanel_jg_jsp ', items: [{title:' Program Details ', ID:"Jgtab", ItemId:' JgTab1 ',//tab ID tabconfig: {//tab Related Settings title:' Program Details ', tooltip:' Program Details '},
Embed JSP page, the page effect is good to implement HTML:' <iframe id= ' Planframe "style=" width: ' +framewidth+ ' px;height: ' +frameheight+ ' Px;border:none; " Src= "' +util.getpath () + '/zjfxjk/institutionslib/jgjs/jgwindow/flowpage1.jsp?id= ' +obj+ ' &partName= ' +obj1+ ' &planid= ' +obj2+ ' &fid= ' +obj3+ ' &mode= ' +obj4+ "&state= ' +obj5+ ' &shzt= ' +obj6+ ' &TASK_ID= ' + obj7+ ' &gkfw= ' +obj8+ ' &szj_spyj= ' +obj9+ ' "></iframe>",//style= "Border:none;" }] //height:900,});
// in the JSP reference JS inside
Method is written outside of the Onready and Ext.onready methods and then called to
After checking the ApiExt.EventManager.onWindowResize method after 5.0 has been deleted, the official recommended to listen to the following methods of window change function Resizewin () {// Monitor window size Change method var planwin=this. Parent. EXT.GETCMP (' EDITPANEL_JG '); Planwin.on ("resize",function(event) { $ (event.el.dom). Find ("iframe"). Width ( Event.width); $ (event.el.dom). Find ("iframe"). Height (event.height-100); }); }
PS:THIS.PARENT.EXT.GETCMP (' EDITPANEL_JG ');
method to get all EXT components outside the window,
Example
function CloseWindow () {
var mode=$ (' #MODE '). Val ();
if ("Check" ==mode) {
THIS.PARENT.EXT.GETCMP (' Shlistpanel '). Store.load ();//List Refresh
}else{
THIS.PARENT.EXT.GETCMP (' Jglistpanel '). Store.load ();
}
THIS.PARENT.EXT.GETCMP (' EDITPANEL_JG '). Close ();//Window closed
}
Ext window Embedded JSP page adaptive