Adsense Ad

Tuesday 27 March 2018

Oracle Forms: A Full Web Browser Java Bean


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

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


Click to download complete package


Reference: http://forms.pjc.bean.over-blog.com/article-5029633.html

No comments: