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

5

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 http://forms.pjc.bean.over-blog.com/ 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

35

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

14

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 (http://www.oracle.com/technology/products/forms/htdocs/10gr2/howto/webservicefromforms/ws_10_1_3_from_forms.html).

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

3

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 http://dashboardspy.com 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.

and

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

    54

    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 1.3.1.22 and 1.3.1.29.

    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

    4

    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

    25

    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

    0

    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 http://forums.oracle.com/forums/thread.jspa?threadID=834438&tstart=0)

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

    Timers and their usefulness, what has changed in Oracle forms 10g ?

    2

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

    Timers were used quite heavily in C/S environments (Oracle forms 6i). Of the many uses, the one that is the most typical is to create a timer when validating an item and then perform an action when the timer expires.

    For example, suppose that we need to sort records in a block according to a given criterion. Whenever a new value or a change occurs in a column (record within the  block) we reorder the block. This implies an execute_query built-in. Another one deals with a go_item whenever we validate a given item. In this case, the error related to restricted built-ins will be raised.

    By including a timer, we will shift the action from the WHEN-VALIDATE-ITEM to the WHEN-TIMER-EXPIRED.

    However, in Oracle forms 10g, the same strategy will raise a whole new issue. Since 10g implies a web environment with a middle-tier hosting the application server, managing timers implies prohibitive server-side management especially with a large user base.

    In this case, another solution might be available by using PJC’s/Javabeans. Oracle has already provided a client-side Timer bean. For the time being, I have not tried this bean since it can be set at a minimum to 1 min. I will have to modify the bean code in order to allow much lower interval (in the milliseconds range).

    Forms migration on UNIX- almost the end!

    2

    Posted by Hafed | Posted in Forms, oracle | Posted on 11-11-2008

    We are almost at the end of our Forms migration to  10g on IBM AIX. I received some emails regarding the points to watch out for. As you can imagine by reading the previous posts, the migration as the forms module are concerned should not take that long especially if you use JDAPI. Somme annoyances here are mostly with WEBUTIL functionnalities that you need to implement (replacing host, file transfer, image treatment etc.)

    However, before even starting the project, you need to do a THOROUGH assessment of your current application and how it is being used. Please be as thourough as you can get in this phase. Otherwise you might have big surprises later on. We have had some really nasty surprises during our journey and that was mainly due to printing on AIX among other things.

    First thing to consider is the application server and the platform you selected for hosting it. If it is Windows, then no major hurdles here. If you move to a LINUX/UNIX/AIX platform, then you will be dealing with the PRINTING problem. Direct printing is no longer available in 10g and the alternatives are not worth looking at (direct print PJC and orarrpt). I am talking here about mission-critical applications.

    Second problem is the font problem. Expect major headaches here since your developers will be working on Windows machines and your reports are deployed on a LINUX/UNIX/AIX machine. Fonts are not the same and you will have to work on getting the same fonts on LINUX/UNIX/AIX. Not an easy task.

    If you have some special printing requirements like we do and I mention here specifically printing on special papers, special paper sizes, automatic printing on designated printers and duplex printing, then you are in for a surprise and a big one I might add. Those are not possible straight out of the box and you will have to do some really nast setups on your report server.

    I have spent about 3 days trying to find solutions on those simple requirements. I am still puzzled that there are almost no mentions about those issues on the OTN forums or anywhere else. Either people are not using IAS on LINUX/UNIX/AIX or I am missing something here. At any rate, I thoroughly searched Metalink for answers and came up almost empty handed.

    I managed to work out solutions for those problems but it has been tough. I will document the solutions we implemented in an upcoming post.

    Finally, the other major problem deals with all the tweaking you have to perform on the forms and reports server. There are so many small things to watch out for and which will take hours to fix. Now, if you get a firewall in the loop and most likely you will have one, then expect some further tweaking to get everything working.

    Anyway, a lot of fun if you move to a LINUX/UNIX/AIX platform.

    Based on all of the hassles we went through, I am tempted to say that LINUX/UNIX/AIX is not really a good option if you have some real printing to do through your application. Better to stick with windows 2003 or 2008. At least Microsoft has put in place a platform that works.

    Where to get help: OTN, Metalink and double check whenever you suspect that litlle looking parameter in that configuration file ….

    P.S: Did I mention that all our reports are in French and that characters with accents are replaced with greek characters when printing using Postscript straight to the printer. What a waste of time just to get that one line somewhere stating that you can’t get those accents unless you convert your postscript output to PDF and then print it using the PDFPrint plugin.