8 Replies Latest reply: Mar 28, 2014 6:44 AM by CraigB RSS

Oracle Forms 11g (main) Content-Canvas

c75fa8ed-9782-4ba3-ab56-1a6d08632e9d Newbie
Currently Being Moderated

If you create 2 content-canvases, which content-canvas is the main content-canvas?

Which canvas will be showed, if I try to run the form.

 

I can´t find an attribute or something for solving this problem.

 

Please help me

  • 1. Re: Oracle Forms 11g (main) Content-Canvas
    tony.g Journeyer
    Currently Being Moderated

    Probably whichever one contains the field which has the current focus.

     


  • 2. Re: Oracle Forms 11g (main) Content-Canvas
    CraigB Guru
    Currently Being Moderated

    You have to realize that Forms is heirarchical so the default canvas displayed is dictated by the first Block/Navigable item listed in the Object Navigator.  You can override this default functionality by coding a "Go_Item('BLOCK_NAME.ITEM_NAME')" in your When-New-Form-Instance trigger.  Personally, I find it easier to simply re-organize your Data Blocks and Items so that your blocks and items are displayed in the order you want them navigated too on screen.  This saves have to create Key-Next-Item and Key-Prev-Item triggers to make sure the Tab order of objects occurs in the correct order.  Of course, there are always situations when you have to write Key-Next/Prev-Item triggers, but this will reduce the number of triggers significantly.

     

    Craig...

  • 3. Re: Oracle Forms 11g (main) Content-Canvas
    c75fa8ed-9782-4ba3-ab56-1a6d08632e9d Newbie
    Currently Being Moderated

    I´m trying to read out an OracleFormsFile (FMB) via JDAPI.

     

    And my problem is, that I can´t detect the "main"-Canvas of the application because I can´t find a property which describes this case.

  • 4. Re: Oracle Forms 11g (main) Content-Canvas
    CraigB Guru
    Currently Being Moderated

    There is no property that specifies the default canvas.  You'll have to figure out with JDAPI how to detect the first block and first item and then read the "Navigable" property to see which is the first navigable item.

     

    Craig...

  • 5. Re: Oracle Forms 11g (main) Content-Canvas
    c75fa8ed-9782-4ba3-ab56-1a6d08632e9d Newbie
    Currently Being Moderated

    What especially is the "Navigable" property and where can I find it in forms?

  • 6. Re: Oracle Forms 11g (main) Content-Canvas
    CraigB Guru
    Currently Being Moderated

    c75fa8ed-9782-4ba3-ab56-1a6d08632e9d wrote:

     

    What especially is the "Navigable" property and where can I find it in forms?

    Well, If you will open your form in the Forms Builder, select any Block - Item and open the property pallet on this item; you can scroll through the list of properties to the Navigation section.  The Keyboard Navigable and Mouse Navigable properties determine whether an Item can be navigated too by a user.  So, to answer your question, it is the combination of the Keyboard/Mouse Naviable properties that specify if an item is "Navigable".

     

    Craig...

  • 7. Re: Oracle Forms 11g (main) Content-Canvas
    c75fa8ed-9782-4ba3-ab56-1a6d08632e9d Newbie
    Currently Being Moderated

    Very nice ok I get it.

     

    But can you explain me more exactly the effects of "keyboard navigable" and "mouse navigable"?

    Are they just responsible to spot the main canvas?

  • 8. Re: Oracle Forms 11g (main) Content-Canvas
    CraigB Guru
    Currently Being Moderated

    c75fa8ed-9782-4ba3-ab56-1a6d08632e9d wrote:

     

    Very nice ok I get it.

     

    But can you explain me more exactly the effects of "keyboard navigable" and "mouse navigable"?

    Are they just responsible to spot the main canvas?

    The best way to understand the affects of these properties is to open the Propery Pallet, navigate to the Keyboard Navigable or Mouse Navigable property and press F1 to bring up the Help Topic for that property.  The Help System lists all of the information you need about these properties, so I will not attempt to summarize the defintion of the properies here.  However, you need to understand what these properties do in order to determine which item is the "First Navigable" item in your Form so you can determine which Canvas is the "First Displayed" canvas.  All of this needs to be combined with the heirarchy of the Form (see my reply from Feb 5 above) to find the canvas that is displayed when a Form is presented.  By reading list of Data Blocks and finding the first block then reading the list of items in the block to see if any of them are Keyboard and Mouse navigable you can determine which Item will have the input cursor in it when the Form runs.  Now that you "think" you know which item has the input cursor or focus - now you can read the Physical section of the properties to determine if the field is Visible and which Canvas it is assigned too.  Even after all of this, it is still just a "Best Guess" that this is the main canvas because the developer can change this default heirarchy programatically and override the default heirarchy to any displayable item by simply coding a GO_ITEM() or GO_BLOCK() in one of the triggers that only fires during initial loading of the form (such as the When-New-Form-Instance trigger).  This is where development standards play a big role.  If your development standard states that all forms should adhere to Forms default heirarchy, then finding the first navigable item and reading it's assigned canvas should give you the main/primary canvas.

     

    Unfortunately, for you, determining the main canvas is not going to be that easy using JDAPI.  However, most forms typically only have one canvas so you could just simply check the list of canvases first.  If there is only one canvas, you're work is done.  If there is more than one canvas, then you would have to read the first block, first navigable item and it's assigned canvas to find what you hope will be the first canvas.

     

    Craig...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points