Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamically add jmol applet in jsf

 
megha lokand
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 shown below:


I downloaded "jmol-11.6.21-binary.zip" from http://sourceforge.net/project/showfiles.php?group_id=23629
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:


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.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

What do you mean by "unable to"? What exactly is happening?
 
megha lokand
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf Dittmer,
Thank you for your reply.

Both codes I mentioned previously are working fine in the jsp page. But I need this functionality from the java code.

Actually I have created a richfaces tab in the jsp page, it consists of an input box, a commandlink etc. Using the information entered by the user in the input box the results are to be retrieved from the database and to be placed in a new tab generated dynamically.

I have successfully created new tab in the back end in java, and placed some panels and panelgrids to the newly created tab with the information extracted from the database. And in one of the panels to be added in the tab I need this functionality to be embedded.

And I don't understand how to do it!

I have also tried to put the above mentioned code in a jsp page and include the page itself dynamically as shown below:



A small panel kind of thing is displayed but content of page included is not shown. It does not show any errors either.

Please help.

Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic