2 Replies Latest reply: Jun 18, 2013 11:28 PM by Pramod SR RSS

    Problem with Two tab canvases in a form

    Pramod SR

      Hi Experts,

       

       

      I am working on Oracle forms 10g (OS: Windows7) from last 1 year. I have got a requirement to create a form with one tab canvas CAN_TAB (with 2 tab pages) in main page and a pop up tab canvas ASN_SPLIT_TAB(with 2 tab pages). Now the problem is whenever we click on tabs it will fire WHEN-TAB-PAGE-CHANGED trigger and executes the complete code. As a result even if i click a tab page in CAN_TAB canvas it will fire for ASN_SPLIT_CANVAS as well. Check the below code (WHEN-TAB-PAGE-CHANGED). Now i have to differentiate between two tab canvases so that i can use IF-ELSE statement to overcome this problem. Please share your useful comments.

       

       

      BEGIN

      Lv_Toppage := Upper(Get_canvas_property('CAN_TAB',Topmost_Tab_page));

        if Lv_Toppage = 'LINES' THEN 

        go_item('shipment_summary.shipment_reference');

        show_view('CAN_LINES');

        show_view('CAN_SCROLL');

        elsif Lv_Toppage = 'ATTRIBUTES' THEN

        go_item('shipment_summary.shipment_reference');

        show_view('CAN_ATT' );

        elsif Lv_Toppage = 'AUDIT' THEN

        go_item('shipment_summary.confirmedby');

        show_view('AUDIT');

        end if;

       

       

      Lv_Toppage := Upper(Get_canvas_property('ASN_SPLIT_TAB',Topmost_Tab_page));

        IF Lv_Toppage = 'INVOICE_SPLIT' THEN

        show_view('ASN_SPLIT_STACK');

        go_item('ASN_INBOUND_CATEGORY_SUMMARY.brand_representitive');

        ELSIF Lv_Toppage = 'SUPPLIER' THEN

        go_item('CONTROL.cancel_but');

        END IF;

        hide_view('ASN_SPLIT_STACK');

      END;

        • 1. Re: Problem with Two tab canvases in a form
          CraigB

          We have a couple of Forms that use more than one tabbed canvas.  We found it was more reliable to use the SYSTEM variables (TAB_NEW_PAGE and TAB_PREVIOUS_PAGE) than using the GET_CANVAS_PROPERTY() built-in.  I recommend you use these SYSTEM variables as well.

           

          Craig...

          • 2. Re: Problem with Two tab canvases in a form
            Pramod SR

            Thanks Craig. You made it happen..!! Below code is working fine for me.

             

            IF :SYSTEM.tab_new_page = 'LINES' THEN

              go_item('shipment_summary.shipment_reference');

              show_view('CAN_LINES');

              show_view('CAN_SCROLL');

            ELSIF :SYSTEM.tab_new_page = 'ATTRIBUTES' THEN

              go_item('shipment_summary.shipment_reference');

              show_view('CAN_ATT' );

            ELSIF :SYSTEM.tab_new_page = 'INVOICE_SPLIT' THEN

            .

            .

            .

            END IF;