After a long research, I finally managed to get it !
In its third version, this Java Bean does not need any extra JDBC connexion to handle images from/to the database, but a single PL/SQL database package.
Thanks Great Blog. I can now get the file w/o the second bean but it will not display the image. I am testing using client sever and I receive this error in the Java console: Image found in DOCBASE: file:/C:/temp/Falcheck.jpgException occurred during event dispatching:java.lang.NoClassDefFoundError: javax/imageio/ImageIO at oracle.forms.fd.HandleImage.imageIconToByteArray(HandleImage.java:621) at oracle.forms.fd.HandleImage.setProperty(HandleImage.java:157) at oracle.forms.handler.ComponentItem.setCustomProperty(Unknown Source)
<br />
It is clearly indicated in the article that this third version needs the Sun Java Plug-in 1.4, and you are probably trying to use it with the JInitiator.<br />
See the second version that runs with Oracle JInitiator:<br />
http://forms.pjc.bean.over-blog.com/article-7109292.html<br />
<br />
<br />
G
Gregg
06/03/2009 19:35
Help! I have not been able to use "imagepicker" and "HandleImage" beans on the same form 10g. Either one works or the other does not. I would like to select an image using imagepicker and display it using HandleImage. Any Ideas? Thanks
<br />
Read the article you are pointing. It contains a method to display the JFileChooser, so that you do noty have to add any other bean for that:<br />
Varchar2 := Get_Custom_Property( 'BL.BEAN', 1, 'GET_FILE_NAME' )<br />
Francois<br />
<br />
<br />
B
boris
09/04/2008 14:17
Dear François,I'm currently using your handleimage3 and it is a nice tool!Just 2 questions:- I would like to change the proposed extensions in the file dialog. Is there a possibility through a bean property or should I edit the bean in JDeveloper?- I'm also using webutil in other forms. The problem is that I can not control the file dialog style, as I can with your bean (system vs. java) ... it apper to be a 'random behaviour'. Do you have any tips? Or is there a bean similar to your, but without image preview?Thanks a lot in advance.Boris
<br />
Boris,<br />
There is no way to change the extension for the single reason that the Bean only reads .gif and .jpeg files.<br />
For the second question, you can write a very simple Java Bean that calls a JFileChooser() and set the Look and Feel:<br />
try<br />
{<br />
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());<br />
SwingUtilities.updateComponentTreeUI(this);<br />
}<br />
catch (Exception ex)<br />
{<br />
ex.printStackTrace();<br />
} <br />
<br />
Francois<br />
<br />
<br />