Overblog Suivre ce blog
Editer l'article Administration Créer mon blog
3 février 2006 5 03 /02 /février /2006 15:24


When you want to load images from the client machine to the database, you would like
to choose the right image file with a preview of each image.

This is a Javabean component that allows to display a JfileChooser dialog box with image preview.
It also allows to display at the same time different file types.


The java code

Get the complete code here

Forms configuration

  • Copy the GetImageFileName.jar file in the /forms/java directory
  • Sign the GetImageFileName.jar file with your own certificate
  • Edit the /forms/server/formsweb.cfg file to add the jar file to the archive_jinit variable

Registring the bean

- Open the form
- Add a javabean component to any block
- Register the bean (be sure that it is not in a When-New-Form-Instance trigger, or use a timer)





Invoke the bean's GetFile() function

image_file_name := FBean.Invoke_char('BLOCK.BEAN_ITEM',1,'GetFile','"Dialog box title","start directory"');




 :BL1.File := FBean.Invoke_char('BL1.IMAGEPICKER',1,'GetFile','"Select an image file name","M:\"');

The sample dialog

  • Download the imagefilechooser.zip file
  • Unzip the imagefilechooser.zip file
  • Copy the imagefilechooser.jar file in your /forms/java/ directory
  • Edit your /forms/server/formsweb.cfg file
  • Open the IMAGEFILECHOOSER.fmb module (Oracle Forms 9.0.2)
  • Compile all and run the module


Partager cet article

Repost 0
Published by Oracle Forms community - dans Bean - JFileChooser
commenter cet article


Luis 28/04/2011 22:57

How do I work the Cancel button.

If I hit cancel button the :BL1.FIC is never null

Oracle Forms community 29/04/2011 07:22

so what is the content?

yosyos 16/01/2011 09:31

where do i paste the .java code ? thank you

Oracle Forms community 16/01/2011 10:35

Read the last paragraph to see how to configure and run the sample dialog.

Gregg 06/03/2009 18:22

Help! I am have not been able to use "imagepicker" and "HandleImage" beans on the same form. Either one works or the other does not. I would like to select an image using imagepicker and display it using HandleImage. Forms10g Any Ideas? Thanks