Overblog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU

This is a bunch of tips and techniques related to Oracle PL/SQL and Forms.

Publicité

A Full Web Browser Java Bean

Purpose

Here is a Java bean that allows to have an enhanced Web Browser.
It is a full Web browser that can handle Javascript and display Flash animations.

The material comes from a sourceforge project:
http://sourceforge.net/project/showfiles.php?group_id=170904


Enhanced Web Browser

It can accept both http url and local machine html file names.

It needs, at least, a 1.4 JRE so the Sun Java plug-in, so that it won't run with the JInitiator.


The Java code

     EnhancedHTMLBrowser.java



The implementation class of the Bean Item

     oracle.forms.fd.EnhancedHTMLBrowser


The methods you can call



  • Get the Forms Window

Set_Custom_Property( 'BL.BEAN', 1, 'INFOBEAN', '' ) ;

This must be used to retrieve the Forms window that handles the webBrowser, then synchronize its position when the windows is moved. This must be the first property set (in the When-New-Form-Instance trigger).

 

 

 

 

 

  • Set the URL/File

Set_Custom_Property( 'BL.BEAN', 1, 'SET_URL', 'url | file_name' ) ;


e.g. :

Set_Custom_Property('BL.BEAN', 1, 'SET_URL', 'http://www.developpez.com/' ) ;         


Set_Custom_Property('BL.BEAN', 1, 'SET_URL', 'd:/mypage.htm' ) ;

  • Set the border of the bean

Set_Custom_Property( 'BL.BEAN', 1, 'SET_BORDER', 'true | false' ) ;


When you want to use this bean to display a Flash image (*.swf), you would probably prefer not to have any border bounding the image.
In this case, set the border to false.


  • Basic navigation

Set_Custom_Property( 'BL.BEAN', 1, 'SET_NAVIGATION', 'back | forward | refresh' ) ;



The sample dialog

     .
Download the eHTMLBrowser.zip file
     . Download the sourceforge project zip file

     . Unzip the files
     . copy the jdic.jar and eHTMLBrowser.jar files in the <ORACLE_HOME>/forms/java directory

     . Edit your /forms/server/formsweb.cfg file to add these 2 jar files
     . Add the 2 .dll files and IeEmbed.exe (from the javaflashbridge-v1.zip file) to your Windows/system32 directory
     . Open the EHTMLBROWSER.fmb module (Oracle Forms 9.0.2)
     . Compile all and run the module

     The .jar files must be signed
     The eHTMLBrowser.jar and jdic.jar files provided with the .zip file are already signed


 

Publicité
Retour à l'accueil
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article
P
Hi! Im receiving the message "No jdic in java.library.path" however PATH env var already has the SYSTEM32 dir set... How can i solve this issue?
Répondre
L
This does not work.<br /> <br /> Did everything as explained and getting error as below:<br /> <br /> java.lang.ClassNotFoundException: oracle.forms.fd.EnhancedHTMLBrowser<br /> at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)<br /> at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)<br /> at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)<br /> at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)<br /> at java.lang.ClassLoader.loadClass(Unknown Source)<br /> at java.lang.Class.forName0(Native Method)<br /> at java.lang.Class.forName(Unknown Source)<br /> at oracle.forms.handler.UICommon.instantiate(Unknown Source)<br /> at oracle.forms.handler.UICommon.onCreate(Unknown Source)<br /> at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)<br /> at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)<br /> at oracle.forms.engine.Runform.processMessage(Unknown Source)<br /> at oracle.forms.engine.Runform.processSet(Unknown Source)<br /> at oracle.forms.engine.Runform.onMessageReal(Unknown Source)<br /> at oracle.forms.engine.Runform.onMessage(Unknown Source)<br /> at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)<br /> at oracle.forms.engine.Runform.startRunform(Unknown Source)<br /> at oracle.forms.engine.Main.createRunform(Unknown Source)<br /> at oracle.forms.engine.Main.start(Unknown Source)<br /> at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source)<br /> at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)<br /> at java.lang.Thread.run(Unknown Source)
Répondre
S
Hello,<br /> <br /> I followed all the mentioned steps and the form opens in the application, but the Browser is not displayed in the form.<br /> Could anyone please suggest on this: what could be the reason(s).<br /> <br /> Regards,<br /> Samir
Répondre
S
We use 10g<br /> <br /> Regards,<br /> Samir
S
i did all the things mentioned in the steps,but when im running the form its not showing anything.. in the java console im getting the below errors<br /> no jdic in java.library.path<br /> The filename, directory name, or volume label syntax is incorrect
Répondre
E
<br /> <br /> Hi,<br /> <br /> <br /> I use JInitiator 1.3.1.22, and I also have installed on my machine the java JRE 1.6.0, but was configured as formsweb.cfg orientation. but not open the page properly, or does not work, as I am<br /> novice in java, I do not know how to load a jar out of JInitiator + Java, or a jar that is not configured into the JInitiator. Could you give me an example of a forms without JInitiator running<br /> or active with a java class that is configured and outside Jnitiator.<br /> <br /> Below the configuration of formsweb.cfg<br /> [webutil]<br /> WebUtilArchive=frmwebutil.jar,jacob.jar,ticker.jar,FormsGraph.jar,eHTMLBrowser.jar,jdic.jar,frmall.jar,JDICplus.jar,ehb.jar<br /> #WebUtilArchive=frmwebutil.jar,jacob.jar,ticker.jar,FormsGraph.jar<br /> WebUtilLogging=off<br /> WebUtilLoggingDetail=normal<br /> WebUtilErrorMode=Alert<br /> WebUtilDispatchMonitorInterval=5<br /> WebUtilTrustInternal=true<br /> WebUtilMaxTransferSize=16384<br /> baseHTMLjinitiator=webutiljini.htm<br /> baseHTMLjpi=webutiljpi.htm<br /> baseHTML=webutilbase.htm<br /> #envFile=formsdemo.env<br /> envFile=default.env<br /> #archive_jini=frmall_jinit.jar,ticker.jar,eHTMLBrowser.jar,jdic.jar,/forms/formsdemo/jars/demo.jar,/forms/formsdemo/jars/FormsGraph.jar<br /> archive_jini=frmall_jinit.jar,ticker.jar,/forms/formsdemo/jars/demo.jar,/forms/formsdemo/jars/FormsGraph.jar<br /> archive=/forms/java/frmall.jar,/forms/java/JDICplus.jar,/forms/java/ehb.jar,/forms/formsdemo/jars/demo.jar,/forms/formsdemo/jars/FormsGraph.jar,/forms/java/eHTMLBrowser.jar,/forms/java/jdic.jar,/forms/java/frmall.jar,/forms/java/JDICplus.jar,/forms/java/ehb.jar<br /> lookAndFeel=Generic<br /> #otherParams=OUTPUT_REAL_DIR=C:DevSuiteHome_10formsdemostemp/ OUTPUT_VIRTUAL_DIR=/forms/formsdemo/temp/<br /> #otherParams=OUTPUT_REAL_DIR=C:WINDOWSTemp/ OUTPUT_VIRTUAL_DIR=/forms/formsdemo/temp/<br /> <br /> <br /> ERROR JINITIATOR<br /> Oracle JInitiator: Version 1.3.1.22<br /> Using JRE version 1.3.1.22-internal Java HotSpot(TM) Client VM<br /> User home directory = C:Documents and SettingsUSUARIOProxy Configuration: Browser Proxy ConfigurationJAR cache enabled<br />      Location: C:Documents and SettingsUSUARIOOracle Jar Cache<br />      Maximum size: unlimited<br />      Compression level: 0----------------------------------------------------<br /> RegisterWebUtil - Loading WebUtil Version 10.1.2.0Loading http://spe29963:8892/forms/java/eHTMLBrowser.jar from JAR cacheLoading http://spe29963:8892/forms/java/jdic.jar from JAR cacheLoading<br /> http://spe29963:8892/forms/java/frmall.jar from JAR cacheLoading http://spe29963:8892/forms/java/JDICplus.jar from JAR cacheLoading http://spe29963:8892/forms/java/ehb.jar from JAR<br /> cacheproxyHost=nullproxyPort=0connectMode=HTTP, native.Versão do Forms Applet é : 10.1.2.0<br /> <br /> <br /> java.lang.VerifyError: (class: oracle/forms/ms/ehb$1, method: signature: (Loracle/forms/ms/ehb;)V) Expecting to find<br /> object/array on stack    at oracle.forms.ms.ehb.$init$(ehb.java:118)    at oracle.forms.ms.ehb.(ehb.java:35)    at<br /> java.lang.Class.newInstance0(Native Method)    at java.lang.Class.newInstance(Unknown Source)    at oracle.forms.ui.VBean.instantiateBean(Unknown Source)  <br />  at oracle.forms.ui.VBean.setProperty(Unknown Source)    at oracle.forms.handler.ComponentItem.setCustomProperty(Unknown Source)    at<br /> oracle.forms.handler.ComponentItem.onUpdate(Unknown Source)    at oracle.forms.handler.JavaContainer.onUpdate(Unknown Source)    at<br /> oracle.forms.handler.UICommon.onUpdate(Unknown Source)    at oracle.forms.engine.Runform.onUpdateHandler(Unknown Source)    at<br /> oracle.forms.engine.Runform.processMessage(Unknown Source)    at oracle.forms.engine.Runform.processSet(Unknown Source)    at<br /> oracle.forms.engine.Runform.onMessageReal(Unknown Source)    at oracle.forms.engine.Runform.onMessage(Unknown Source)    at<br /> oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)    at oracle.forms.engine.Runform.startRunform(Unknown Source)    at<br /> oracle.forms.engine.Main.createRunform(Unknown Source)    at oracle.forms.engine.Main.start(Unknown Source)    at sun.applet.AppletPanel.run(Unknown<br /> Source)    at java.lang.Thread.run(Unknown Source)<br /> <br /> <br /> Thank you for your attention and patience.<br /> <br /> Elves.<br /> <br /> <br /> <br />
Répondre
O
<br /> <br /> Here is a link that explains how to use the Sun plug-in instead of the JInitiator:<br /> <br /> <br /> http://fdtool.free.fr/LAF/doc/implementation.htm<br /> <br /> <br />  <br /> <br /> <br /> <br />