in my application basically coded with extjs , i have a module coded with flex 4 the problem is that flex makes long time at the first load , so i wonder if i can preload flex before the user need it
This is the code for the ext window that host the flex application :
function openPdf(){
var user = Ext.get('userName').getValue();
PlanRs = new Ext.Window({
width:'100%',
autoHeight:true,
autoScroll:true,
html:'<iframe src ="PlanRs/index/bin-debug/index.html?user='+user+'" ></iframe>',
bbar:[{
text:'Close',
handler:flexAppCloseHandler
}]
})
Plan开发者_StackOverflow中文版Rs.show();
}
i have tried to instantiate the window and make it invisible until user call with no success!
When you create the Ext.Window it still isn't rendered due to ExtJS's lazy rendering mechanism. This means that the iframe isn't inserted into the DOM as long as the component isn't rendered by calling show()
for example.
Try instantiating your Ext.Window and calling PlanRs.render()
manually and only call PlanRs.show()
in your openPdf()
function.
精彩评论