A "File Dropper" Java Bean
By francois degrelle on Friday, March 27 2015, 15:31 - PJC - Javabean - Permalink
Purpose
Here is a Java Bean from Gert Poel, to Drop an external file within the Forms applications.
The Java source
FileDrop.java FileDropBean.java
The implementation class of the Java Bean
oracle.forms.gp.FileDropBean
The event fired by the Java Bean
DROP
The full filemane 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;
END IF;
END;
The sample dialog
. Download the filedrop.zip file
. Unzip the filedrop.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