Hi all,

I am trying to add jmol applet in jsf. This applet is used to retrieve the structure of a molecule.
I am able to get this functionality by using script tag as follows:
<html>
	<head>
	<title>testing applet</title>
	      <script src="myjmol/Jmol.js"></script><!-- REQUIRED -->
	</head>
	<body>
             <rich:panel>
                 <script type="text/javascript">
                 jmolInitialize("myjmol","JmolApplet.jar");
                 jmolApplet(300, 'load "temppdb.pdb"');
            </script>
           </rich:panel>
       </body>
</html>



Downloaded "jmol-11.6.21-binary.zip" from SourceForge.net: Jmol: Files
and extracted all the files into folder named "myjmol". This contains the js files to use jmolInitialize() and jmolApplet(0 functions.

Another method found is using the applet tag as follows:
.....
<body>
<rich:panel>
	<applet name="jmol" code="JmolApplet" archive="JmolApplet.jar" codebase="myjmol" width="300" height="300" mayscript="true">
		<param name="progressbar" value="true" />
		<param name="load" value="temppdb.pdb" />
	</applet>
</rich:panel>
</body>
............

But I am unable to add this functionality dynamically to the jsf panel from the java code.
Any help would be much appreciated.

Thanks in advance.