Saturday, July 25, 2015

Handling Multiple Windows

Handling Multiple Windows 


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,


     A window is just a container for all logical visual attributes that make up a Form Builder application. A single form may include several windows. You must create at least one content canvas for each window, but only one content canvas can be displayed at run-time, even though more than one content canvas can be assigned to the same window at design time.

Key Problem:
 When clicking the close ('X') ICON of the current window, another existing window is getting opened which is not desirable feature.


Key Reason:
 There is no default behavior in closing Oracle Window Forms; when a user chooses the Close Menu item or the upper right ('X') icon. The window form will not automatically close. You must define a form-level trigger "When-window-closed" with such associated built-ins or system variables.   


Key Solution:

When-Window-Closed trigger:

     
      In regard to Single Oracle Window  form, you can use the mentioned trigger  to  close a window pro-grammatically when the operator issues a window manager–specific close command. Issuing the close command is just perfect for a single window form.


 EXIT_FORM;

     In regard to multiple Windows form consider "SYSTEM.EVENT_WINDOW" system variable. It keeps the name of the last window for which a window interaction trigger fired. You can also use this system variable to perform different actions for different windows in your window interaction triggers.



You can close a window using built-ins.

HIDE_WINDOW,SET_WINDOW_PROPERTY, and EXIT_FORM 


WHEN-WINDOW-CLOSED trigger example at form-level...

      
Suppose you have more than a window (WINDOW1, WINDOW2 ...)
 You can perform closing each window by using the following system variable
" SYSTEM.EVENT_WINDOW".



IF :SYSTEM.EVENT_WINDOW='WINDOW1' THEN

  -- Do something while closing window1/canvas1 

         DO_KEY('exit_form');


ELSIF :SYSTEM.EVENT_WINDOW='WINDOW2' THEN

  -- Do something while closing window2/canvas2 

  HIDE_WINDOW('WINDOW2');

   ... etc.

END IF;



Or you can use the following built-ins in "WHEN-WINDOW-CLOSED" trigger 
  


HIDE_WINDOW('current_window_name');

SHOW_WINDOW('main_window');

GO_BLOCK('block_name');

GO_ITEM('next_window_item');


...This applies on any form window types or forms version

The following Link is:


    Learn more about:


·          Dependent Drop Down list


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.


Thursday, July 23, 2015

PDE-PLI018 Could not find library NAME

PDE-PLI018 Could not find library NAME



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 skills gained from experienced such development errors; Googling  for a solution, ask a professional friend, leads you to successfully climb the ladder of experience. Employers are often looking  for a value you can add to hire you. 

     Normally, experience does not come easily, as long as you work on Oracle forms application development you would face a lot of compilation or run-time form's errors either begins with 'FRM' or  with 'ORA' database errors. These errors are common errors to large numbers of expert Oracle developers. 

      Accidentally, You may face such uncommon error begins with e.g. PDE-  pop up for you on opening such Pl/SQL Library from Oracle Form Builder. Today, i will demonstrate to you such uncommon error you should be familiar with ...

Key problem: 

  Error: PDE-PLI018 could not find library NAME
 When you try to open the library in the oracle forms builder it throws the above error even though the library is included in the path...

Key Reason:
  

   It's a  form 10g 's bug. 

When attempting to open a .pll from the Forms Builder using the login of the User who is not having the administrator privilege, the following error occurs: PDE-PLI018 could not find the library



Key Solution: 

      When attempting to open a .pll from the Forms Builder using the login of the User who is not having the administrator privilege, the following error occurs: PDE-PLI018 could not find the library.
  •  The simplest solution for this bug is you should have OS's administration rights so that you can login and Run The Form Builder As administrator .
  •  This Bug is also included as part of the Patch Set 10.1.2.3 whereas for the Versions 10.1.2.0.2 and 10.1.2.2, One-Off Patch 2673271  has to be applied.

You can you check this form 10g's bug at My Oracle Support (MOS) document 602158.1





    Hope this helps…

    Learn more about: 



      

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



    Wednesday, July 22, 2015

    Centralize Oracle Window Forms 


    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,



       Centralize Oracle Window Forms On Web Browser Definition:Task 
      
    Task Solution: 

    You can use the following code in 
    WHEN-WINDOW-ACTIVATED or PRE-FORM Trigger Form Level


    SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WINDOW_STATE, MAXIMIZE);  
    SET_WINDOW_PROPERTY('MAIN_WINDOW', X_POS, (GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WIDTH ) - GET_WINDOW_PROPERTY('MAIN_WINDOW', WIDTH )) / 2);  
    SET_WINDOW_PROPERTY('MAIN_WINDOW', Y_POS, (GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, HEIGHT) - GET_WINDOW_PROPERTY('MAIN_WINDOW', HEIGHT)) / 2);  


    The following code  is another option you can use in
     WHEN-WINDOW-ACTIVATED or PRE-FORM Trigger Form Level



    DECLARE

        v_window               WINDOW;
        v_window_height        NUMBER(10);
        v_window_width         NUMBER(10);
        v_height               NUMBER(10);
        v_width                NUMBER(10);
        v_ calc_width          NUMBER(10);
      

    BEGIN

       v_window := FIND_WINDOW(YOUR_WINDOW_NAME);

       v_height := TO_NUMBER(GET_APPLICATION_PROPERTY (DISPLAY_HEIGHT));

       v_width := TO_NUMBER(GET_APPLICATION_PROPERTY  (DISPLAY_WIDTH));

       v_window_height:= GET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, HEIGHT);

       v_window_width := GET_WINDOW_PROPERTY (FORMS_MDI_WINDOW, WIDTH);

                 v_calc_width: = (v_width - v_window_width)/ 2;


                 v_calc_height : = (v_height - v_window_height)/ 2;

    SET_WINDOW_PROPERTY(v_window,POSITION,v_calc_width,v_calc_height);

    END;




    Note: 


    DISPLAY_HEIGHT: Returns the height of the display in the coordinate system of the form module.
    DISPLAY_WIDTH: Returns the width of the display in the coordinate system of the form module.


    Learn more about: 

    ·        Dependent Drop Down list

    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.


    Maximize Window Oracle Forms

    Maximize Window Oracle Forms


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

         I believe that the rule #1 in structuring a user interface is a consistency that allows developers to reuse code for similar tasks. Consistency helps you to minimize the effort spent in fixing errors, reducing the training costs consumed in explaining the logical workflow that matches their real workflow and increasing the user's adaptability to work on the application. Thus, your application will make sense to the user if every widget or control works consistently as expected.

        On the other hand, Upgrading Oracle from client-server to the web base was the biggest challenge that a lot of companies had. Oracle Web forms are a different kind of architecture: 3-tier (client-application-data). At the client, Forms runs in a Java-applet started from a web browser. 

        Hence, the 'Maximum' Window button is an example of inconsistency; it was working fine in client-server architecture, but it won't work the same way in 3-tier architecture.

         Now, let's highlight the issue of "Maximize Oracle Window Forms" this would really help maintaining consistency all over your application specially in upgrading from client-server to the web base application.

     Key problem:  Oracle Window web-base Form NOT Maximizing.


    Maximizing Oracle Client-Server Window forms is different from maximizing MDI window on Oracle web-base forms using the same code in WHEN-NEW-FORM-INSTANCE  Trigger :


    SET_WINDOW_PROPERTY (FORMS_MDI_WINDOW, WINDOW_STATE, MAXIMIZE) ;
         SET_WINDOW_PROPERTY ( 'UR_WINDOW_NAME', WINDOW_STATE, MAXIMIZE) ;


    Even though the MDI window on Oracle web-base forms appears as Maximized but it is NOT actually maximized and it doesn't show the complete status bar. 

    Key Reason:

       Unfortunately, there is no built-in way to actually "MAXIMIZE" in the parent or MDI window. This issue has been explained in BUG#4944285 Known and  Note 181100.1

    Key Solution: 


    Search for  formsweb.cfg file, open it with note pad to view the content, look for a parameter called ' separateFrame' this parameter takes a Boolean data type either True or False value. edit and save the changes you prefer to make after reading the difference between the two value's affection.


     separateFrame=TRUE

    Oracle Web base Forms cannot actually maximize the separate frame for the JRE limitation issues, but alternatively you can maximize the MDI Window to be the same size as the applet container. You have two options either:

    1.   You can add the following code to WHEN-NEW-FORM-INSTANCE  or PRE-FORM trigger:



    SET_WINDOW_PROPERTY (FORMS_MDI_WINDOW, WINDOW_STATE, MAXIMIZE);

    SYNCHRONIZE;


    2.  Or you can use the following java bean example in the following link:  

            A JavaBean to handle the Forms applet's frames


    3.     Alternatively you can use  Michael Ferrante's suggestion (Principal Product Manager).  
      
      
     separateFrame=FALSE

    In this 'separateFrame' value option 'FALSE', the form's parent window container is the browser itself. Oracle Forms cannot maximize the browser.

    The Oracle Forms window MDI only fills out the applet container space NOT the web browser. Thus in order to maximize the web browser you have to set the following in formsweb.cfg file.


    HEIGHT=100%

    WIDTH=100%


    Note: Pls. refer to My Oracle Support  Note:358468.1
     This note explains the bug issue with a specific solution on
     " How to Maximize the MDI Window correctly on Web showing the Status bar?" 

      
    Hope this helps…

    Learn more about: 
         ·        Dependent Drop Down list
         ·        In-Direct Global Variable Access


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