Adsense Ad

Tuesday 24 April 2018

Oracle Forms: Image File Dropper

Purpose:
 To create drag n drop functionality in oracle forms by which images can easily upload.

Pre-requisite
 For this activity we need to first configure WEBUTIL. I already posted a document regarding the configuration of WEBUTIL. Here is the link.

Webutil For Forms 10G



The implementation class of the Java Bean

     oracle.forms.gp.FileDropBean

The event fired by the Java Bean

 DROP

The full filename is transmitted in the EVENT_MSG parameter.


DECLARE
l_eventName varchar2(30) := :system.custom_item_event;
l_eventValues ParamList;
l_eventValueType number;
l_event_msg VARCHAR2(255);
BEGIN
IF l_eventName = 'DROP'
THEN
l_eventValues := get_parameter_list(:system.custom_item_event_parameters);
get_parameter_attr(l_eventValues,'EVENT_MSG',l_eventValueType, l_event_msg);
IF :system.record_status <> 'NEW'
THEN
create_record;
END IF;
:ctrl.file_location := l_event_msg;
client_image.read_image_file ( :ctrl.file_location, substr ( :ctrl.file_location, instr ( :ctrl.file_location,'.')+1), 'IMG' );
END IF;
END;


The sample dialog
     .
 Download the OracleFormsDropFile.zip file
     . Unzip the OracleFormsDropFile.zip file
     . Copy the FileDrop.jar file in your /forms/java/ folder     . Add it to the archive and archive_jini tags of the /forms/server/formsweb.cfg file
     . Open the FILEDROP.fmb module (Oracle Forms 10.1.2)
     . Compile all and run the module

2 comments:

Tania June said...
This comment has been removed by the author.
Tania June said...

Not working .Jar file is missing.