Oracle Forms 10g: How to avoid record navigation?

Posted on 2011-04-21
Last Modified: 2012-05-11
How to avoid record navigation in Oracle Forms 10g?

My form has 5 blocks: 3 Control-Blocks and 2 Blocks where the user can navigate through the records.

The user must remain in the same record when the focus is on the first 3 Control Blocks. Rules:

1) If he presses the key (Page Down) to navigate to the next record, nothing happens.

2) If he presses the key (Page Up) to navigate to the previous record, nothing happens.

3) If he presses the button using the mouse to navigate to the next record, nothing happens.

4) If he presses the button using the mouse to navigate to the previous record, nothing happens.

5) If he presses the button using the mouse to insert or delete a record, nothing happens.


p.s.: Please assist my other questions.
Question by:jocafi
    LVL 20

    Accepted Solution

    1 find out what logical trigger in forms corresponds to your  "Page down"   (for example key-nxtblk) .  
        1a  Create such a trigger on all 3 control-block and code
                 -- message('you hit key-nxtblk');  -- to check what key trigger you need
                 null; -- disable normal functioning of the key
         1b Create such a trigger on forms level and check :system.trigger_block  in (ctrl1,ctrl2,ctrl3) for a conditonal disa
               if :system.trigger_block in ('CTRL1', ..) THEN
                    null; -- disable normal functioning of the key
                   NEXT_BLOCK;  -- use the build-in that corresponds to normal key-behaviour
               end if;
    2 same method / other keys/triggers and build-in
    3,4,5 check the when-button-pressed trigger of the button : change it to prevent what you don't want
        if you can't figger it out, show an example of the code

    When the focus is in one of the control-blocks what should the user do to be able to navigate ?

    LVL 2

    Author Closing Comment

    Many Thanks, flow01. It works !

    I put the code below (adjusting the code for each key) in the triggers KEY-NXTREC, KEY-PRVREC, KEY-DOWN, KEY-UP:

     -- normal DB blocks
     if :system.trigger_block in ('COLABORADORES','PARTICIPANTES') THEN
              -- control blocks
             -- disable normal functioning of the key
     end if;

    I adjusted the code above in other triggers too.
    LVL 34

    Expert Comment

    by:Mark Geerlings
    That may confuse the users (leaving them to wonder why the navigation keys work in some blocks, but not others), but it should work.  I would rather see the trigger not just do "null:" when you want to disable it, but display an alert to indicate that the requested navigation event is not available in this block.

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    732 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

    24 Experts available now in Live!

    Get 1:1 Help Now