How can I create hyperlink to call a form from a form ?

Posted on 2006-04-18
Last Modified: 2008-08-31
Normally I called another block or form thru button triggers. There I put my necessary command to invoke another form. But I want to change my traditional menu into something like a webpage that used hyperlinks.

Can anyone helpme on this. Your prompt reply are very much appreciated.
Question by:KG1973
    LVL 1

    Author Comment

    I forgot to mention that I am using Oracle Developer Suite.
    LVL 47

    Accepted Solution

    Wow to implement a Java Bean in Forms 9i ( in a
    9iDS environment.  This example discusses implementation of one of the
    simplest beans from the Forms 9i: the Hyperlink bean.  The Hyperlink java bean is a
    PJC, which can be plugged into Forms to provide a UI widget, that looks and acts like
    an HTML hyperlink.

    Before implementing the Hyperlink bean you must download and install the Forms
    9i Demos.  

    Step 1: Creating the Form with the Bean

    Open Form Builder and create a simple form called hyperlink.fmb that uses the
    Hyperlink bean.  Here are the steps:

    a. Create a form with a canvas.
    b. Create and on-logon trigger with a null in it.
    c. Bring up the canvas and create a bean item on it.
    d. Bring up the property palette and name the bean HYPERLINK.
    e. Rename the block that was automatically created in step c to CONTROL.
    f. Create a WHEN-NEW-FORM-INSTANCE trigger at the module level with the
       following code:

            hHyperlink ITEM:=FIND_ITEM('CONTROL.HYPERLINK');
            FBean.Invoke(hHyperlink,1,'setLabel','Forms on OTN');

       The above sample uses the Fbean package, which is a new feature in Forms 9i.
       It provides a means to register the properties and methods of Arabians at run
       time and make setter and getter methods available from PL/SQL in Forms. As
       you can see, the above lines are registering the bean, setting the URL and
       Label and enabling a listener.

    g. On the  'CONTROL.HYPERLINK' item add a WHEN-CUSTOM-ITEM-EVENT trigger with
       the following code:

          vcEventData VARCHAR2(256);
          vcEventData := Fbean.Invoke_Char('CONTROL.HYPERLINK',1,'getURL');

       This code simply gets the URL in response to a mouse click and uses the Forms
       WEB.SHOW_DOCUMENT to display it.

    You will not be able to see the hyperlink in the layout editor. It will only
    display when you run the form after configuring your environment to find the

    Step 2: Finding the Bean

    Before the bean class files can be found they must be placed in the appropriate
    location. Once you have installed the Forms 9i Demos a "demo" directory will be
    created under the 9iDS_Home\forms90 directory. This directory contains the
    Hyperlink bean as well as a number of others. There are two ways to ensure the
    Hyperlink bean's class files can be found by your form when running it from the
    9iDS Form Builder:

    The easiest method is to place the hyperlink.jar file in the
    9iDS_HOME\forms90\java directory. This is the recommended method for deploying.
    For development purposes one may find it more convenient to move the appropriate
    bean class file to the appropriate codebase directory structure. Here are
    descriptions of each method:

    Method 1 - The JAR Method:

    a. Locate the hyperlink.jar file located in D:\9iDS\forms90\demos\hyperlink\classes.
    b. Move the hyperlink.jar file to 9iDS_HOME\forms90\java.
    c. Find the formsweb.cfg file in 9iDS_HOME\forms90\server.
    d. Add the following configuration section to the file:

      The archive_jini parameter pointing to hyperlink.jar is the most important part
      of this configuration.

    e. Now go into Form Builder and accomplish the following:
       Edit->Preferences->Runtime Tab
       Add the config parameter to your "Application Server URL". It should look
       something like this:


    Method 2 - The Codebase Method

     This method is not recommended for deploying your application but is handy
     for development purposes. It allows you to run the test the bean from the Form
     Builder  without defining a default configuration file in your  in the Form
     Builder's  "Application Server URL" value.

    a. Create a directory called  "demos" in the 9iDS_HOME\forms90\java\oracle\forms
    b. Create a directory called "beans" within "demos" directory created above.
    c. Copy the Hyperlink.class file to:

       The Hyperlink.class file can be found in:
    d. Now go into Form Builder and accomplish the following:
       Edit->Preferences->Runtime Tab
       Verify the  "Application Server URL" looks like:

    Once you have created the form you can see it work from inside Form Builder using
    either deployment method  by just running the form using the "Run Form" button.
    The  "Forms on OTN" hyperlink will appear on the form if there are no set up errors.
    Clicking on the link should take you to:

    You also can run the form outside of Form Builder. Here are the ways, depending on
    the deployment method:

    Method 1 - In your browser type:


    Method 2 - In your browser type:


    Again, the recommended method for deploying is method 1 but either method can
    be used to deploy the bean form to a 9iDS Release 2 environment.

    Note: The Hyperlink bean also comes with a sample form found in
          9iDS_HOME\forms90\demos\hyperlink\forms and documentation, which can be
          found in 9iDS_HOME \forms90\demos\hyperlink\doc\hyperlink90.html.

    LVL 1

    Author Comment

    Hi Schwertner,

    Wow!!!! That's really something for me and I never thought such a quick response.
    This is the reason why I joint / subscribe Expert-exchange forum.
    I don't know yet whether this will work for me or not.
    But I am happy that there is a place for me to discuss my difficulties and get the solution interactively.

    Thanks a million and I will try this once I understood well all those steps.
    LVL 1

    Author Comment


    Sorry before I continue, I am currently using Oracle Develope Suite 10G which I think not so much different with 9i form. However if there is any major different, will all those steps that you elaborated be changed as well ?

    LVL 47

    Expert Comment

    I also use Oracle Develope Suite 10G (but the version only called so, in fact it is 9.4......).
    No, I am sure that this feature is not oblelete.
    Also a good approach is to use online help of Forms.
    LVL 1

    Author Comment

    Hi schwertner,
    Today I tried all step that you suggest.
    1st try, it failed. I noticed that "f90all_jinit.jar" file is not found because I am using 10G instead of 9ids. But after I replaced with "frmall_jinit.jar", the form displayed without error.

    But when I click to the hyperlink, somehow the explorer blocked it. I tought this is just a small problem. "Popups were blocked in this page, press and hold control......".  But after I set my firewall "allowing all", the problem still remain. Strange ? Is this anything to do with my form OR just simply my explorer ? Another thing is, what if I want to add another link ? Do I have to repeat Step1 f ?

    Thanks in advance.
    LVL 47

    Expert Comment

    Popup blocked -----> It is feature of the browser. Go to the browser properties and allow popups.

    In order for Internet Explorer to download JInitiator automatically, you need to disable "Pop-up" blocking.
    To do this, go to "Tools","Pop Up Blocker", and select "OFF"
    After you've successfully installed JInitiator, you can turn Pop-up blocking back on.
     To do this, go to "Tools","Pop Up Blocker", and select "ON".
    LVL 1

    Author Comment

    I already did that. Strange thing is The Demo runs ok, even if I set the blocker on.
    LVL 1

    Author Comment

    Hi Schwertner,
    I have accepted your solution even the hyperlink were still blocked by pop-up blocker.
    But I would be grateful if you can tell me other possibilities that may cause such problem
    and how to maximise the form so that it can utilised the whole screen as normal IE does.

    Thanks a million.
    LVL 47

    Expert Comment

    I will do my best to help you.
    LVL 47

    Expert Comment

    What is your OS?
    Do you use firewalls? XP uses default firewall, turn it off.
    Look for hidden firewall products in the Processes list.
    Antiviruses? Turn of!

    Use the latest versions of Dev. Suite!
    E.g. forms 9i can not run against OAS 10g!
    Same for the OAS - latest version!

    The Forms9i Demos currently do not come with 9iDS Release 2 ( and
    must be downloaded from otn.  You can download them from:

    On this page you will see the ReadMe and Source for the ?The Oracle9i Forms
    Demos.? You can click on the Source link and download them to your computer and
    unzip them.  Now follow these instructions to install them:

    1) Download Jinitiator from OTN if you don't have it installed
    2) Unzip the file into a suitable temporary folder e.g. c:\temp\9idemos
    3) Start the 9iDS OC4J before installing
    4) Start the Universal installer from the Oracle Installation Products start
    menu option. This should be Oracle Universal Installer 2.1.
    5) Point the installer at the (c:\temp\9idemos\)products.jar file and select
    your 9iDS Oracle Home as the home to install into.
    6) Follow the installer instructions
       a) You will next see a screen that asks for the OC4J Admin Port and Password.
    If you did a default install of 9iDS Release 2, you can take the defaults.
       b) Enter Database Information
       c) Decide if you wish to do a complete install of the demos.  If you wish to
    use only a few of the beans, such as the hyperlink, getclientinfo, keyfilter,
    etc., you will not need to install the DB objects.
       d) The next screen just explains how to install the demo schemas should you
    choose to do so later.
       e) The following screen gathers DB information for installing the demo
       f) The demos need to know where Jinitiator is installed so enter it
    on this screen.
       g) Now you are ready to install them.
    7) Once you have completed the installation the demos will be installed in the
    9iDS_home\forms90\demos directory.

    This set of demos is only intended for installation into an Oracle9iDS
    Oracle Home on Windows NT or 2000


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
    Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
    This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
    This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now