I have a JSF page with two applets, both applets communicate with JSF by javascript, each applet communicate with external devices and get images coded base64
<p:accordionPanel widgetVar="panel" collapsible="true" id="panelApplets">
<p:tab title="Fun 1" id="tabFun1" >
<h:panelGrid columns="2" cellpadding="10">
<div id="applet1">
<applet id="appletFun1"
codebase="../applets"
code="AppletFun1.class"
archive="Fun1.jar"
width="800"
height="540">
</applet>
</div>
<p:inputTextarea id="res_appletFun1" value="#{bean.stringFun1}" style="width:400px;height:200px;" effectDuration="400"/>
</h:panelGrid>
</p:tab>
<p:tab title="Fun2" id="tabFun2">
<h:panelGrid columns="2" cellpadding="10">
<div id="applet2">
<applet id="appletFun2"
codebase="../applets"
code="Fun2.class"
archive="Fun2.jar"
width="220"
height="300">
</applet>
</div>
<h:inputHidden id="res_appletFun2" value="#{bean.stringFun2}" />
</h:panelGrid>
</p:tab>
</p:accordionPanel>
My problem is that one of the applets get base64 coded string in corerct fashion, meanwhile other applet doesn´t. Debuging applet that doesn´t work, i found that following line is unable to get JSObject returning jso=null
JSObject jso = JSObject.getWindow(this);
Both applets are nearly identical. Anybody knows what could be happening? Why JSObject.getWindow(this)
returns null
?
I´m using jdk. 1.6_037, both applets are JApplet.
Thanks in advance