Oracle Forms

This is a solution to get an Oracle Forms contextual html help system that does not cost .... Copy the help_ctx.htm file in the /forms/html/ virtual directory (see the ...
722KB taille 36 téléchargements 361 vues
Contextual html help pages - Francois Degrelle

Oracle Forms web A contextual html help pages system for low budget project Home page

1. Purpose

When you deliver an application, the job is not really complete if it is not shipped with a help system. Sometimes, for small projects, the budget allowed does not take into account the help system. (talking about buying a tiers robot help maker solution and formation that comes with...). This is a solution to get an Oracle Forms contextual html help system that does not cost anything. The help system contents only html pages that could be build with a simple html editor. The simple mechanism is provided with html bookmarks inside. This system provide the following benefits: No third-part soft to buy No special formation The conception/realisation phase could be done by another team - what about the communication/artistical department ? (it’s so modern !) The html system allows to use internal and external navigation mechanisms like bookmarks and hyperlinks.

2. What is a contextual help system ? This system allows to a user to display some help on a current topic. In an Oracle Forms application, this could be the whole dialog, a specific canvas, block or item. With html documents, we could use the bookmark functionality to jump anywhere we want in the page.

3. How to call the html page and jump to the correct bookmark ? You can assign some form-level key triggers that indicate the target topic, then use the Web.Show_Document() Forms web built-in to call the html page with the corresponding bookmark.

4. Assign the form-level key triggers In this example, I Assign four form-level key triggers: KEY-F1 (Ctrl+Shift+F1) to get the current item help KEY-F2 (Ctrl+Shift+F2) to get the current block help KEY-F3 (Ctrl+Shift+F3) to get the current tab canvas help KEY-F4 (Ctrl+Shift+F4) to get the current dialog help Each trigger calling the same procedure, passing its particular argument KEY-F1 code:

Display_Help(1) ; [email protected] - http://fdegrelle.over-blog.com/

Contextual html help pages - Francois Degrelle

KEY-F2 code: KEY-F3 code: KEY-F4 code:

Display_Help(2) ; Display_Help(3) ; Display_Help(4) ;

5. Display the html page To display the corresponding html page, we use the Web.Show_Document built-in. We need to build a correct url with the page name and the corresponding bookmark. This html page is stored in a server directory pointed in the httpd.conf or the forms.conf configuration files. The html file name is the same as the Forms module name (with lower case). The following code show the procedure that build the url and call the page: PROCEDURE Display_Help ( PN$Scope in PLS_INTEGER ) IS LC$Form Varchar2(80) := Lower( Name_in( 'system.current_form' ) ); LC$Block Varchar2(60) := Lower( Name_in( 'system.cursor_block' ) ); LC$Item Varchar2(60) := Lower( Name_in( 'system.cursor_item' ) ); LC$TabCan Varchar2(60) ; LC$Path Varchar2(128) ; LC$Cmd Varchar2(128) ; BEGIN --------------------------------------------------------- Only used to test on a Developer Suite environment -LC$Path := 'file://D:\Dev10gR2/tools/web/help/' ; -------------------------------------------------------LC$TabCan := GET_ITEM_PROPERTY(LC$Item , ITEM_TAB_PAGE ) ; LC$Item := Replace( LC$Item, '.', '_' ) ; -- Build the calling url -LC$Cmd := LC$Path || LC$Form || '.htm' ;

-- dialog name

If PN$Scope = 1 Then LC$Cmd := LC$Cmd || '#' || LC$Item ; End if ;

-- item bookmark

If PN$Scope = 2 Then LC$Cmd := LC$Cmd || '#' || LC$Block ; End if ;

-- block bookmark

If PN$Scope = 3 Then LC$Cmd := LC$Cmd || '#' || LC$TabCan ; End if ;

-- tab bookmark

-- Display the html page -Web.show_document(LC$Cmd, '_blank') ; Clear_message ; END;

6. The html page content In the corresponding html page, I added the correct bookmarks before each corresponding entry. The html file must have the same name that the Forms module.

[email protected] - http://fdegrelle.over-blog.com/

Contextual html help pages - Francois Degrelle

tab canvas bookmark name is the tab canvas name property block bookmark name is the block name property item bookmark name is build with the block name and the item name, separated with the _ (underscore) character.

7. The sample dialog Download the formshtmlhelp.zip file Unzip the formshtmlhelp.zip file Copy the help_ctx.htm file in the /forms/html/ virtual directory (see the /forms/server/forms.conf file) Open the HELP_CTX.fmb module (Oracle Forms 10.1.2) Compile and run the module

Place the cursor anywhere you want and call the help. (Ctrl+Shift+F1 to get the current item help)

[email protected] - http://fdegrelle.over-blog.com/

Contextual html help pages - Francois Degrelle

In this example, i call the help from the EMP.SAL item

[email protected] - http://fdegrelle.over-blog.com/

Contextual html help pages - Francois Degrelle

[email protected] - http://fdegrelle.over-blog.com/