Oracle Forms Javabean Property Editor


Posted by Hafed | Posted in Forms, oracle, PJCs/Javabeans | Posted on 16-01-2009

As I was finalizing the technical note for another gauge bean, it hit me that I wasted quite some time designing the visual part of the bean. In Oracle Forms, you create the bean on the canvas, assign it a height and width and then set up the implementation class.

Now, in order to customize it, you would have to follow the bean’s developer recommendations and use the set_custom_property built-in in order to modify the bean properties. However, this implies that as a developer, you would have to compile and run the module each time in order to see the result.

In my case, it requires a number of iterations and that bothers me quite a bit. That’s where I suddenly realized that when I designed MouliForms, I created a class that was basically a clone of the Oracle Forms property palette editor ( Remember F4 !!).

I asked myself whether I can extend the same concept to Forms javabeans and here what I think should come out in a few days (hopefully not weeks):

  • Create an XML file that lists the bean’s properties, categories they belong to and type (String, Int or boolean).
  • From the property palette editor, read and parse the XML file.
  • Developer will select the values for each property and then Preview the bean
  • If the developer is fine with the design, output the bean init procedure as an Oracle Forms program unit.
  • I guess that should do it and could be very useful.

    Gauge with thermometer style display- Javabean for Oracle Forms 9i-10g


    Posted by Hafed | Posted in Forms, oracle, PJCs/Javabeans | Posted on 14-01-2009

    Increasingly, power users are requiring more and more info in a manageable form. This is the case with dashboards and financial screens.

    There are already a number of javabeans that can be quickly deployed with Oracle Forms 10g and the PJC depot at lists a number of very useful beans. On OTN, you can also download a number of beans and the BIgraph bean is one of them and provides a number of charts.

    While there are other visual display beans designed with the JAVA community in mind, only a few are available for Oracle Forms users.

    In attempt to alleviate this problem, we propose a basic bean that is styled like a thermometer. While it can be used for this specific purpose, it can be used in other areas as well.

    thermometer bean

    The screenshot above shows the bean with the value that is set from the Forms canvas. This can also be fetched from a table and triggered by the Timer bean for example.

    The current value displayed by the bean can be retrieved using the Forms custom item built-in.

    A number of properties have been included with this bean in order to allow specific customization to be carried out by developers. Future versions will include other properties that will enhance the graphic aesthetics.

    Download bean, FMB, technical note and source code

    Oracle Forms Migration Challenges- A Recap


    Posted by Hafed | Posted in Forms, oracle | Posted on 13-01-2009

    I finally was able to complete a document that highlights the phases, challenges and solutions that we put in place during our migration from Forms 6i to 10g.

    I would have hoped to have it before we embarked on the migration but here it is for those that might have to go through the same. Please do place your comments so I can improve it.

    Download document: Challenges migrating Forms 10g

    Java with Oracle Forms 10g- Sending SMS messages


    Posted by Hafed | Posted in Forms, oracle | Posted on 11-01-2009

    One of the ways to extend Oracle Forms 9i-10g is with the use of JAVA. However, a number of Forms developers can’t seem to come to terms with JAVA and are unaware of the possibilities they have with the combination Oracle Forms-JAVA.

    I recently was about to give a presentation on JAVA for PL/SQL developers (similar to the one by Peter Koletzki), Anatomy of a PJC/Javabeans and JAVA in the Oracle Forms architecture. I thought then about putting together a tutorial so that someone familiar with Oracle Forms can rapidly grasp the basics of using Forms with JAVA.

    Here is an example that shows how to send SMS messages through a Forms module. This follows the tutorial on OTN (

    My objective here is to go over the OTN tutorial and show exactly why we are using one approach, namely using JAVA on the application server side, instead of the client side or the DB side.

    I have to add that I ran into configuration issues that dealt mostly with classpath problems. In order to use the external SMS web services, there are a number of JDeveloper classes that need to be in the classpath when making calls through the Forms module. I show that in the tutorial.

    Another approach, based on a stored PL/SQL procedure, was also used to demonstrate that we can also send SMS messages quite simply without any JAVA. However, the goal of this tutorial is to show how to put in place the bridge that allows a Forms module (PL/SQL wrapping) to use the functionnalities provided by JAVA classes on an application server.

    The tutorial is in french and the english version will follow very soon.
    Download tutorial envoi_sms_oracle_forms_10g

    Gauges, Dials and more for Oracle Forms


    Posted by Hafed | Posted in Forms, oracle, PJCs/Javabeans | Posted on 07-01-2009

    I don’t really know why but lately I found myself wanting to design dials, gauges and thermometers. May be it is because I spent a lot of time on or it seemed to me that Oracle Forms users are lacking some of the nice visualization components available on other platforms.

    See this link for a nice dashboard. Actually, this is the one that we will be designing once these javabeans are completed this week.

    So, with that in my mind, I sketched two basic gauges, make that one gauge and one thermometer, that can be used to display some data coming from tables or straight from measurement sensors (think of National Instruments telemetry).

    Here are the rough sketches I made with the properties that can be changed for each gauge.


    There are other properties that can be included but for this version these are the only ones.

    There are constraints when designing with Java graphics on Oracle forms. I am listing here the ones I think are important.

  • Use JInitiator whenever possible since most implementation are still using it instead of SUN JRE.
  • The Jar files should be of the smallest possible size.
  • Graphic routines should not cause any flickering or cause side-effects.

    I will be releasing the JAR files by the end of this week.

  • Oracle Forms 10g- Using Static Google Maps with HTTP geocoding service


    Posted by Hafed | Posted in Forms, oracle, PJCs/Javabeans | Posted on 02-01-2009

    Here is an update with the files for implementing a javabean that displays a static google map for a given location.

    In a number of back-end applications, users as well as entities are registered with their address information. In some cases, it is desired to provide a visual representation of this address information.
    A free service that is provided by Google allows us to obtain the map for a given address as well as additional info such as directions from a given point to this address.

    This is a bit difficult to implement in Oracle Forms 10g since the Google API is based on Javascript. In those cases where Javascript is blocked or not possible, Google provides another service which is called Google Static maps.

    What this service provides is a static image of the map based on the address information. This can be sufficient in a number of Forms applications.

    In this note, we provide a javabean that will display the static map in addition to the latitude and longitude corresponding to the address provided by the user (or fetched from a table).

    First, we will use the Google Maps HTTP geocoding service to retrieve the latitude and longitude. Then, we use this data to fetch the static map from the Google static map service.

    Static Google Map Javabean output-Oracle forms 10g

    This javabean can be used either with the SUN JRE or Oracle Jinitiator. It has been tested with Jinitiator and

    Download the jar, java file, sample FMB and the technical note

    Please note that the javabean has also been submitted to the Pluggable Java Component & JavaBean ‘s library website maintained by Francois Degrelle.

    Static Google Map image Javabean in Oracle Forms 10g


    Posted by Hafed | Posted in Forms, oracle, PJCs/Javabeans | Posted on 30-12-2008

    Here is an output for a Javabean that shows the image from a Static Google Map.

    Static Google Map Javabean output-Oracle forms 10g

    The example shown here is for the google headquarters. The user inputs the address info in the Forms module and the Javabean takes care of fetching the data from Google Maps.

    The process is done in two steps. First step is converting the address into Latitude and longitude (HTTP Geocoding) and then the static map is obtained from Google based on this info.

    I will post the javabean here very soon.

    File Selection Dialog with Oracle Forms 10g (10.1.2): replacing some of webutil functionalities


    Posted by Hafed | Posted in Forms, oracle, PJCs/Javabeans | Posted on 24-12-2008

    When you have a directory with a complicated hierarchical structure (nested sub-floders), using webutil to browse the folder is inadequate. This is mainly due to the use of JFileChooser which is notoriously slow in this case.

    Since most implementations use JInitiator, one way to circumvent this problem is to implement a bean that will make use of AWT FileDialog.

    Based on the fileuploader bean found in the oracle forms 10g demos, I have implemented a bean that provides file selection.

    This has been tested on Forms 10g 10.1.2 on IBM AIX. Please note that the bean was put together in about 10 hours in order to resolve this specific directory browsing and file selection.

    Download jar, pll and installation doc

    Update: Here is the FMB with the demo: fileupload.fmb

    Migration is over and our Oracle Forms 10g application is now in production


    Posted by Hafed | Posted in Forms, oracle | Posted on 05-12-2008

    We passed the test and our application has now been in production for 5 days.

    A lot has happened since we started the Oracle forms migration to 10g (both the Database and application were migrated to 10g).

    Some minor glitches did happen when our users started using the new webforms but overall we are having positive feedback.

    Preliminary comments are mostly  related to pop-up blockers on IE that did not behave as expected. Remember that to display reports from Forms, we use web.show_document and this one opens up the pdf.

    Webutil is also causing some concerns especially with the FILE functionalities (see

    But overall with close to 1200 modules, it is quite an achievement that we did not have major issues.

    Strategies for keeping up to date with Oracle forms…


    Posted by Hafed | Posted in oracle | Posted on 28-11-2008


    One of my students recently asked me a question relating to how he can make himself valuable compared to other job applicants.

    While I could have answered him with one of those pre-packaged all-purpose answer, I really thought about how I myself manage to keep my knowledge up to date.

    I do not pretend to be superman but I think that I have the ability to get involved in interesting projects and most important provide the best (working at least) solutions.

    Thinking about it, I do not believe that it is due solely to my own personal abilities but more because of the interactions I have with others on a daily basis.

    So, I outline in the following the steps I follow in a typical workday. Please bear in mind that the info that follows is geared more toward Oracle Forms but is quite relevant if you work with different platforms, languages, environments, etc…

    • Know who the major and important contributors in your field are and where to find them. In my case, Oracle OTN is the place to be and I make sure to check the Oracle Forms and Reports Forums first thing in the morning. I glance at the current topics and see who posted the topics. While there are a number of experts, those to watch out are Francois Degrelle, Steve Cosner, Tony Garabedian, RajeshAlex and Andreas Weiden.

    As a side note, I am quite amazed to see that current practicing forms developers do not even know about the OTN forum. On another level, I also found some quite interesting solutions on ORAFAQ.

    • Check the Forms and Reports OTN pages at least once a week. There might be some news of interest there.
    • Download JCreator LE and start experimenting with PJCs and Javabeans. If you migrate to Oracle 10g, javabeans will provide you with new ways to extend Forms functionalities. You will be amazed what you can do with javabeans.

    As a side note, don’t take anything for granted. While Oracle Forms is still here and is very productive, nothing forbids you from learning JAVA or .NET. I myself choose JAVA for some reasons and is quite happy with it. That’s just one more thing in my bag.

    • Try to take time to understand the new Forms architecture. You will save yourself some valuable time when working with Forms 10g if you understand how Forms calls are processed.
    • Do Google for Oracle forms keywords from time to time. You might come up with interesting results.
    • Last but not least, be interested in other platforms, languages and environments. Almost every week, I check for the latest in development trends and there are quite interesting stuff over there to check. For example, I have done quite some work with WordPress, PHP, mysql and ruby on rails based on the tutorials I found from links posted on dzone.
      While I won’t consider myself a PHP or RoR developer , I can say that I know how to get around with them.