Looking smart is easy when you havethe right info.

Anonymous



A blog by Hafed Benteftifa.

First glimpse at the Oracle Forms HTML Rich Text Editor

27

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

Glad to be reporting that I am almost done with the Oracle Forms rich text editor. Some issues with outputting the rich text item thru reports and deciding how to save the contents. For the time being, I checked query and insert modes and the set_custom_property and get_item_property are working fine without any loss.

I am using a text item to store the contents and that’s the column that is physically tied to the table. I think that’s the best way to manage the rich text item. I checked Degrelle’s HTMLPane and that’s how it is being managed.

The JAR file stands now at 170 Kb which is not that big given that I have about 30 Kb for png images (used in the toolbar). However, I am doing now a refactoring and trying to slim the jar down to about 100 Kb. I am not too worried about the size since the file itself is cached the first time the user accesses the module.

The features that already passed testing:

Basic toolbar: in this mode, the user can opt to use only the top bar.

  • Basic text styling: bold, italic and underline
  • unordered and ordered lists
  • Text alignment
  • Indent and outdent

Advanced toolbar: more features with most having passed the test

  • Cut, copy and paste
  • Text Search and replace
  • Horizontal rule (HR), break (BR)
  • Special Characters insertion
  • Adding and removing a hyperlink
  • Adding an image (working but some issues)
  • Inserting Table, rows and cells
  • Font selection, size and color. Foreground property
  • Text highlighting color property
  • HTML source code editing (working but some issues)
  • HTML preview mode

Because of the limited screen real estate available for the rich text item, there are other features that can’t be accessed thru the toolbar buttons. I am using accelerator keys to let the user action them. Some of those are:

  • Undo
  • Redo
  • Deleting table rows
  • Deleting table cells

As I mentionned, adding images is a snap. However, I am still pondering about whether to let the user insert an image from a URL or from a drive. The only option I see working for the general case is allowing an image to be referenced fom a URL.

The editor uses a default cascading style sheet. However, there is going to be a way for the developer to assign a company mandated stylesheet.

Likewise, there are a number of properties that can be set from Forms.

That’s the status right now and I think the editor should be out by the end of January 2009.

Last, I am still undecided about the name. May be frmEd. I welcome your suggestions.

Rich text editor or HTML editor for Oracle Forms: Decision time !

2

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

A project that I started in September 2008 was motivated by the lack of rich text editors in Forms applications. Francois Degrelle has already provided an HTML editable bean that can provide adequate styling.

However, there are situations where features, comparable to those found on such editors as TinyMCE, are needed.

Based on this requirement, I started the project and quickly put together a bean that allowed several styling beyond Bold, Italic and left justified, etc.

However, one question remained and that one is related to the exact type of editor: should it be a rich text or HTML editor ?

While the difference might not be obvious, it is clear there are differences between the two. The main one being the font support. Remember that a Forms application is supposed to run on any supported platform and as such, and I believe that’s the case for most implementations, application servers are most of the time deployed on UNIX/LINUX boxes in addition to Windows servers.

With that in mind, I opted for an HTML editor with one strong requirement: support for printing through Oracle reports. The reason has to do with the way the editor will be used.

In most cases, it is not going to be used for blogs or whatever but simply to provide rich text editing for ITEMS in a Forms application and here we are talking about business (back-end) applications that ultimately output data to printers or pdf documents.

A Dashboard styled Oracle Forms bean

5

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

Here is another dashboard styled bean that can be used in BI screens. While it can be used for this specific purpose, it can be used in other areas as well.

Dashboard style 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 Javabean Property Editor

2

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

    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

    52

    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.

    Happy new year-2009

    0

    Posted by Hafed | Posted in personal | Posted on 31-12-2008

    The end of the year 2008 is fast approaching so it is time for me to comment on what happened, good or bad, this last year.

    First of all, I participated in a wonderful Oracle migration project which took most of the year to complete. I have been doing quite some programing with Java, Oracle forms and PL/SQL. In addition, I had to fix a number of issues with our application. This blog has been updated quite regularly with the issues and solutions I have put in place. I hope to continue doing that in the coming year.

    Quite notably, I was able to design MouliForms and a number of javabeans. It has been an interesting journey and the best part is the team I worked with. They have been very helpful, competent and nice to work with.

    The year 2008 started very well as far as I am concerned. I was teaching Oracle Forms and Designer to two groups of extremely talented students. I had fun teaching evenings even though I was also working full time during the day too.

    Unfortunately, 2008 ended on a sorry note, at least for now :). Right after getting an excellent evaluation from my students, I was let go as a lecturer.

    While I thought this was just a passing annoyance, my contract in my current work got cancelled on christmas eve right before the holidays.

    Well, when things start to go wrong, you can’t help it but pause, reflect and then move on. What can you do?

    I know things will improve. After the rain, there is always sunshine.

    Finally I would like to wish everyone a healthy, joyful and very productive 2009.