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

    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.

    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