PDA

View Full Version : Problems resizing iframe/applet inside ContentPanel



Uwem
24 May 2007, 5:24 AM
Hi,

I try to develop a webpage where the user can switch betwenn different Tabs with dynamic content. The content is loaded through iframes or
applets that are directy embedded into the Page (because of iframe/applet issues).

What works:
- The pannels are added and content is read.
- Iframe is resized only on window resizes

Problems:
- The IFrame is not resized vertically initially.
- The IFrame does not resize on Splitbar changes (additional code needed?)
- The applet is not resized at all. I get the following error:
Java class PurePlayerPro has no public field or method named "dom"
[Break on this error] Ext={};window["undefined"]=window["undefined"];Ext.apply=function(o,c,_3){if(_3)...

I did not find a Solution in the Forum or on Help Pages.
Do you know a Solution?

The Code shows the function that adds the ContentPanel


var panel = new Ext.ContentPanel(Ext.id(), { autoCreate:true, fitToFrame:true, title: title, closable: false, background:true});

panel.on("activate",function(){
if ((panel.getEl().dom.firstChild) == null){
if (link.indexOf('panorama')>-1){
var appl = panel.getEl().createChild({tag: 'applet',
archive:'view/panorama/PurePlayerPro.jar',
code:'PurePlayerPro', style:'width:0px,height:0px'});
appl.createChild({tag: 'param', name:'gui', value:'view/panorama/gui.xml'});
appl.createChild({tag: 'param', name:'panorama', value:'view/panorama/pano.xml'});
appl.fitToParent(true);
}else{
var iframe = panel.getEl().createChild({tag: 'iframe', border:0,frameborder: 0, src: link+"?"+parameter});
iframe.fitToParent(true);
}

}
},panel,true);
subLayout.add(subRegionName, panel);


Some other Problems (not yui-ext related)
- Quick changing between yui-tabs makes Webpage tabs of firefox unclickable!
- Firefox process stays after closing and has to be killed then.


Thank you in advance.

dnixon
17 Aug 2007, 1:50 PM
I have a similar problem with an applet embedded in a dialog window that I am trying to use for multiple file selection/drag and drop. I get the same error as you did when I try and call an applet method from javascript:



Java class com.myco.blah.blah.blah.myApplet has no public field or method named "dom"



dropFiles = document.myApplet.myPublicMethod();


I can get my applet to resize with the dialog ok - set width="100%" and height="100%" in the applet tag.

There is also a funky Z-order issue: if my applet dialog is posted, and then an error occurs a separate error dialog is popped up but is hidden behind the applet dialog. The title bar and controls of the applet dialog gray out, preventing closing it or moving it so the only recourse is to kill the browser or browser tab. I guess the applet itself is what the last error dialog is hidden behind.

FF 2.0 or IE 6 with 1.1