Oracle Forms Community - Pluggable Java Components & Java Beans' library

To content | To menu | To search

Friday, March 27 2015

A Javabean to handle Google Maps

Purpose

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

The enhanced Web browser JAR comes from the JDIC sourceforge project.


 

Web Browser to handle Google maps



The implementation class of the Bean Item

     oracle.forms.fd.GMapBrowser


The methods you can call

  • Get the Forms Window

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

This mathod is 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 HTML content

Set_Custom_Property( 'BL.BEAN', 1, 'SET_HTML_CONTENT', '<html>...</html>' ) ;

In the case of this bean, that method is used to initialise the Google map.

 

  • Set a javascript command 

Set_Custom_Property( 'BL.BEAN', 1, 'SET_JAVASCRIPT', 'javascript code' ) ;

e.g. :

Set_Custom_Property('BL.BEAN', 1, 'SET_JAVASCRIPT', 'map.panBy(100,60);' )

 

  • 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 gmapbrowser.zip file

     . Unzip the files
     . copy the
JDICplus.jar and GMapBrowser.jar files in the <ORACLE_HOME>/forms/java directory
     . Edit your /forms/server/formsweb.cfg file to add these 2 jar files to the archive tags
     . Add the 2 .dll files 
jdicArc.dll and jdicWeb.dll (from the JDICplus-0.2.2-bin-win32.zip file) to your Windows/system32 directory
     . Open the GMapBowser.fmb module (Oracle Forms 10.1.2)
     . Compile all and run the module


     The .jar files must be signed
     The GMapBrowser.jar and JDICplus.jar files provided with the .zip file are already signed

 

LAF 1.7.7 new Forms module to have fun

Hello there,

It's been a long time.
This is an amazing new .FMB Forms module, kind of "Tetris" like game.
It needs the last 1.7.7 version of the LAF to run. The game is a little bit buggy, but the aim, there, is only to demonstrate what you can do with new LAF 1.7.7 dynamic shape creation and animation.

 

Have a good time :-)
Francois

Download the brickdown.fmb module there.

Forms Resizer tool for free

Merry Christmas to everybody :)


This year, my present will be the Forms Resizer tool free for you!

You can use, play, modify and deploy it as you need and as you want. There is no license at all attached to it.

But, I won't continue to update, maintain it in any way, so there will not be any new version, any support, and I won't respond to any question about it.


Get the Forms Resizer tool for free there

Francois

A "Breadcrumb" type menu

Purpose

Here is a Java Bean with a "breadcrumb" menu type behaviour
.


Conceal Text Field


The Java source

     BreadCrumb.java


The implementation class of the Java Bean

     oracle.forms.fd.BreadCrumb


The methods you can call



  • Set the background color

Set_Custom_Property( 'CTRL.BREADCRUMB', 1, 'SET_BACKGROUND', '#FFFFFF' );
 

  • Set the Font

Set_Custom_Property( 'CTRL.BREADCRUMB', 1, 'SET_FONT', 'Verdana,bold,14' );
 
second argument can be plain, bold, italic or bolditalic

 

 

  • Set the menu content

Set_Custom_Property( 'CTRL.BREADCRUMB', 1, 'SET_CONTENT', LC$Menu_Content );
 
declare
 s varchar2(2000);
begin 
 s := '<style>a.val {color: red}</style>';
 s := s || '<a class="val" href="module1.fmx">option 1</a>';
 s := s || ' >> <a class="val" href="module2.fmx">option 2</a>';
 s := s || ' >> option 3';
 Set_Custom_Property('CTRL.BREADCRUMB', 1, 'SET_LOG', 'true');
 Set_Custom_Property('CTRL.BREADCRUMB', 1, 'SET_BACKGROUND', '#FFFFFF');
 Set_Custom_Property('CTRL.BREADCRUMB', 1, 'SET_FONT', 'Verdana,bold,15');
 Set_Custom_Property('CTRL.BREADCRUMB', 1, 'SET_CONTENT', s);
end;

 

 

 

  • Set the log

Set_Custom_Property('BLOCK.TEXT_ITEM', 1, 'SET_LOG', 'true'); 

The event raised back to Forms

While the end-user selects an option, the LINK_ACTIVATED event is raised, then the link name is transmitted via the LINK_NAME parameter:

When-Custom-Item-Event trigger:

DECLARE
 
    eventName      varchar2(30) := :system.custom_item_event;
    eventValues    ParamList;
    eventValueType number;
    p1             varchar2(256);
 
BEGIN
 
   eventValues := get_parameter_list(:system.custom_item_event_parameters);
  
   IF (eventName='LINK_ACTIVATED') THEN  
      get_parameter_attr(eventValues,'LINK_NAME',eventValueType, p1);
      :CTRL.OPTION := p1;
      new_form(p1);
   END IF;
 
END;



The sample dialog

     .  Download the breadcrumb.zip file
     .  Unzip the breadcrumb.zip file
     .  Copy the breadcrumb.jar file in your /forms/java/ folder
     .  Add it to the archive and archive_jini tags of the /forms/server/formsweb.cfg file
        e.g.: archive_jini=frmall_jinit.jar,breadcrumb.jar
                archive=frmall.jar,breadcrumb.jar
     . Open the breadcrumb.fmb module (Oracle Forms 10.1.2.0.2)
     . Compile all and run the module
 

Images : keep the initial quality - phase IV

This is another version of the Handle Image Java Bean. Is is based on the 3rd Bean version, with the following new features:

 

1. SETTOOLTIP() method to attach a tooltip to the Image Item


2. New Drag and Drop feature that allows the end user to drop an image file directly to the Image component.

 

An event is sent back to Forms to tell that the end user has changed the image content:

 

DECLARE 
    eventName varchar2(30) := :system.custom_item_event;
    eventValues ParamList;
    eventValueType number;
    p1  varchar2(256);
BEGIN
   eventValues := get_parameter_list(:system.custom_item_event_parameters);
  
   IF (eventName='IMAGE_DROPPED') THEN  
      get_parameter_attr(eventValues,'IMAGE_NAME',eventValueType, p1);
      Message('Image dropped:' || p1,no_acknowledge);      
   END IF;
END;


 

Get the new handleimage4.zip file

- page 1 of 13