Overblog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU

This is a bunch of tips and techniques related to Oracle PL/SQL and Forms.

Publicité

A "File Dropper" Java Bean

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

Publicité
Retour à l'accueil
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article
A
Hi there,<br /> <br /> I know this is an old post, but I was hoping you might be able to help with something.<br /> I was using the bean with forms 11g. After an upgrade to 12c the bean no longer works. The drop square seems completely inactive and nothing happens.<br /> Do you perhaps have any ideas?<br /> <br /> Thank you!
Répondre
F
Sorry, but it is a long time I stopped working whith that... I ha no idea. Display the Java console at runtime. Maybe it is related to new Java Applet policies...
H
Hi,<br /> <br /> I can't run in administrator mode, is there any restrictions or suggestions?<br /> <br /> Thanks in advance!
Répondre
A
<br /> Hi,<br /> <br /> <br /> I was really interested by your Java Bean ... but I have this error message, could you help me ?<br /> <br /> <br /> error java.lang.UnsupportedClassVersion ....<br /> <br /> <br />  <br /> <br /> <br /> Thanks<br />
Répondre
O
<br /> <br /> This means that the Bean was compiled with a more recent version than the JRE you use to run Form. Maybe you're still using the old JInitiator. Upgrade to a more recent JRE.<br /> <br /> <br /> <br />
P
<br /> Hi Geert,<br /> <br /> <br />  <br /> <br /> <br /> I'm having trouble with the filedropper: the demo fmb is ok but when I enhance it to have a base tabled block to store Blobs using webutil it freezes the application and the file explorer (during<br /> the communication with the bean in th WCIE).  Can you help me ?<br />
Répondre
O
<br /> <br /> Gert has no access to my blog, so I suggest you to ask that question on the Forms.PJC.Bean forum.<br /> Choose one of the first two sub-forums (PJC or JavaBean)  ;-)<br /> <br /> <br /> Francois<br /> <br /> <br /> <br />
S
<br /> Hello,<br /> <br /> <br /> Regarding the FileDropBean:<br /> <br /> <br /> Am I right to conclude that only the file-name is send from applet to the Forms runtime (connected and running frmweb.exe) on server?<br /> <br /> <br /> In other words: no bytes are transfered to the server?<br /> <br /> <br /> Thanks, regards, Stephan<br /> <br /> <br />  <br /> <br /> <br />  <br />
Répondre
O
<br /> <br /> Yes, you are right.<br /> <br /> <br /> <br />