A Full Web Browser Java Bean 2nd edition
By francois degrelle on Friday, March 27 2015, 15:24 - PJC - Javabean - Permalink
Purpose
Here is a Java Bean from Mark Striekwold
to have an enhanced Web Browser (2nd edition). It is a full Web browser
that can handle Javascript. This bean is based on the idea of the Full Web Browser Java Bean
and rewritten so it makes use of the fbean package to register the bean
and to call the methods of the java bean. It also makes use of a newer
version of the jdic.jar which makes it easier to use under windows.
The material comes from the JDICplus project (WIN32 only):
https://java.net/projects/jdic
It can accept both http url and local machine html file names.
It
needs, at least, a 1.6 JRE so the Sun Java plug-in, so that it won't
run with the JInitiator and earlier version of the Sun Java plug-in.
The Java code
ehb.java
The implementation class of the Bean Item
oracle.forms.ms.ehb
The methods you can call
- Register the bean
fbean.register_bean('BL.BEAN', 1, 'oracle.forms.ms.ehb');
This is the very first operation you have to do.
- Get the Forms Window
fbean.invoke( '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
fbean.invoke( 'BL.BEAN', 1, 'setUrl', 'URL');
e.g. :
fbean.invoke( 'BL.BEAN', 1, 'setUrl', 'http://mark-oracle.blogspot.com');
- Set the border of the bean
fbean.invoke( 'BL.BEAN', 1, 'setBorder', '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
fbean.invoke( 'BL.BEAN', 1, 'setNavigation', 'back | forward | refresh' ) ;
e.g.:
fbean.invoke( 'BL.BEAN', 1, 'setNavigation', 'back');
The sample dialog
. Download the ehb.zip file
. Unzip the ehb.zip file
. Copy the ehb.jar file in your /forms/java/ folder
. Download the JDICplus project zip file
. Unzip the JDICplus-0.2.2-bin-win32.zip file
. copy the /lib/JDICplus.jar in your /forms/java/ folder
. copy the /lib/bin/jdicArc.dll and /lib/bin/jdicWeb.dll in your /windows/system32 folder
. Update your /forms/server/formsweb.cfg configuration file:
. archive=frmall.jar,ehb.jar,JDICplus.jar
. Notice
that we update the archive tag and not the archive_jini tag because
this bean needs the Sun Java plug-in 1.6 and won't run with any older
version, including the Oracle JInitiator
. Open the EHBROWSER.fmb module (Oracle Forms 10.1.2)
. Compile all and run the module
The .jar files must be signed
The ehb.jar file provided with the .zip file are already signed
For any question concerning this bean, send a mail to Mark at mark.striekwold@gmail.com.