Tuesday, June 2, 2015

Create a Stacked Canvas on a Content Canvas



Create a Stacked Canvas on a Content Canvas 



In the name of Allah, Most Gracious, Most Merciful   
Praise be to Allah, blessing and peace be upon our prophet Mohammed, his family and his companions. After that,


      The navigation between multiple oracle form canvases can be little bit tricky to get it work. Many developers rely on the form's implicit behavior and never consider adding the actual code required to perform the navigation task between form canvases.


Key Problem:

  • The stacked canvas crashes;it disappears.
  • Furthermore not able to see the stacked canvas when the cursor reverse back to the content canvas.

Key Reason:

         The problem mainly lies in:
  1.  The incorrect order of the logical steps in your code.
  2.  The form cursor next destination is not enabled or not included in your code.        
      you have to compare the logical code steps with the default form cursor behavior. 
        
  • It's fancy to imagine, if you were an internal cursor, how should you walk in a form from one block to another and navigate from one text item to another between different form canvases...?
  • Now, let us assume you as a cursor is currently on a stacked canvas then, you decided to leave it and  go to the content canvas. So, you press the close button. But, the way to the content canvas was damaged then, the  form crashes. This means an incorrect order of the logical steps of your code. 
  • For instance, you may use 'Hide_View' before using 'Go_item'.  Notice, the view is your way if you hide it first then, go no where. At this moment, the cursor becomes abandoned or lost and the form crashes.  

Key Solution: 

You have to follow the logical steps as a solution...

1.     Display the Stacked canvas.
  o   SHOW_VIEW(<'CANVAS_NAME'>);
2.     Determine the block name if you have more than a block.
  o   GO_BLOCK('Block_name');
3.     Determine the cursor focus; which item block will receive the cursor.
   o   GO_ITEM('Item_name');
4.     Hide the content canvas.
   o   Hide_VIEW(<'CANVAS_NAME'>);


    Guide Lines You Folow:  

*   The text item where the cursor will move to MUST be visible and navigable.

*       Set the content canvas 'Raise On Entryproperty to 'Yes' .

In When-Button-Pressed Trigger paste the following code:
Note: Renaming to the object names between practice is needed. 


/* Show the Stacked Canvas...*/
SHOW_VIEW('STACKED_CANVAS');

 /* Pls note the following item should be navigable and visible in your stacked canvas form */
 GO_ITEM ('item_name');

/*hide the original content canvas*/

HIDE_VIEW('CONTENT_CANVAS');



    Reverse Cursor Navigation to the Content Canvas    

    Let's assume that your cursor is on your stacked canvas. Now, you want to close it and return back the cursor to your main content canvas.

     In When-Button-Pressed Trigger paste the following code:
      Note: Renaming to the object names between practice is needed. 


/* Hide the original stacked canvas*/

HIDE_VIEW('STACKED_CANVAS');

 /* Display the original content canvas*/

SHOW_VIEW('CONTENT_CANVAS');

GO_BLOCK('EMP');

/* Pls note: It's very important to investigate the next item cursor's destination MUST BE navigable and also visible on your Content Canvas otherwise your cursor will be stacked to no where and cause a crash*/

GO_ITEM('EMPNO');



      
      If your form table has a lot of  fields that you have to display then, you can organize its display through using one or more stacked or tab-canvas on a content canvas according to it's logical relations and priorities. This logical organization leads to the customers' satisfaction and amity to work on the new application and add some respect and appreciation to you on the customer's account.
       Hence, the more organized graphical user interface (GUI) you offer, the more easier for you to train the application user (especially users with a few computer skills), the less training cost and the more saving time and efforts you will get.

     



Learn more about:


"Hide 'Window' Menu Bar in Oracle Forms 6i & 10g"


Hope this helps…

My success only comes from Allah, pls. note your comments and suggestions are great help for me in progress thanks in advance.





No comments :