This discussion is archived
7 Replies Latest reply: Dec 4, 2012 12:40 AM by DurgaSrinivas_886836 RSS

Tab pages not changed when selecting from TAB LIST

DurgaSrinivas_886836 Newbie
Currently Being Moderated
Hi All,

I have a form which has 15 tabs, 1st 10 Tabs are dynamic (enabled at new form instance, depending on configuration) and 11 to 15 are Static tabs visible for all.

My problem is when i am clicking on tabs iam able to switch tabs, but when I select tab from Tab List I am not going to the selected TAB.

Ex: when I am in TAB 1 and Select TAB15 from Tab list My form Still Stays in TAB1 and not moving to TAB 15

Please provide me a Solution.


My code in WHEN TAB PAGE CHANGED is

DECLARE
l_curr_rec NUMBER;
     BEGIN
          l_curr_rec := :SYSTEM.CURSOR_RECORD;

          --Get the Top Default Tab Page for the Form
          SHOW_VIEW('HDR_CANVAS_FIXED');
          :global.headers:=GET_CANVAS_PROPERTY('TAB_CANVAS', topmost_tab_page);

     IF(:GLOBAL.HEADERS='AS_REC_IMAGE')THEN      


SHOW_VIEW('AS_REC_IMAGE');
SET_VIEW_PROPERTY('AS_REC_IMAGE',VISIBLE,PROPERTY_TRUE);

SET_TAB_PAGE_PROPERTY('AS_REC_IMAGE',ENABLED,PROPERTY_TRUE);

          GO_BLOCK('AS_REC');
               
               --Hide the other canvases except the Pricing Canvas                     


     ELSIF(:GLOBAL.HEADERS='TRIM_REC_IMAGE')THEN      


SHOW_VIEW('TRIM_REC_IMAGE');
SET_VIEW_PROPERTY('TRIM_REC_IMAGE',VISIBLE,PROPERTY_TRUE);

SET_TAB_PAGE_PROPERTY('TRIM_REC_IMAGE',ENABLED,PROPERTY_TRUE);

          GO_BLOCK('TRIM_REC');
               
               --Hide the other canvases except the Pricing Canvas                     

     ELSIF(:GLOBAL.HEADERS='AS_SHIP_IMAGE')THEN      

SHOW_VIEW('AS_SHIP_IMAGE');
SET_VIEW_PROPERTY('AS_SHIP_IMAGE',VISIBLE,PROPERTY_TRUE);

SET_TAB_PAGE_PROPERTY('AS_SHIP_IMAGE',ENABLED,PROPERTY_TRUE);
          GO_BLOCK('AS_SHIP');
               
               --Hide the other canvases except the Pricing Canvas                     

     ELSIF(:GLOBAL.HEADERS='TRIM_SHIP_IMAGE')THEN      

SHOW_VIEW('TRIM_SHIP_IMAGE');
SET_VIEW_PROPERTY('TRIM_SHIP_IMAGE',VISIBLE,PROPERTY_TRUE);

SET_TAB_PAGE_PROPERTY('TRIM_SHIP_IMAGE',ENABLED,PROPERTY_TRUE);

          GO_BLOCK('TRIM_SHIP');
               
               --Hide the other canvases except the Pricing Canvas                     


     ELSIF(:GLOBAL.HEADERS='EXTRA')THEN      
               ---Show the Export Canvas---------     


SHOW_VIEW('EXTRA');
SET_VIEW_PROPERTY('EXTRA',VISIBLE,PROPERTY_TRUE);

SET_TAB_PAGE_PROPERTY('EXTRA',ENABLED,PROPERTY_TRUE);
          GO_BLOCK('EXTRA');
               
               --Hide the other canvases except the Pricing Canvas                     



     ELSE -- DYNAMIC TABS
--Hide all the other  static canvases


IF (:GLOBAL.HEADERS='CT01')THEN
     GO_BLOCK('CT01');
     
ELSIF (:GLOBAL.HEADERS='CT02')THEN
     GO_BLOCK('CT02');
     
ELSIF (:GLOBAL.HEADERS='CT03')THEN
     GO_BLOCK('CT03');
          
ELSIF (:GLOBAL.HEADERS='CT04')THEN
     GO_BLOCK('CT04');
     
ELSIF (:GLOBAL.HEADERS='CT05')THEN
     GO_BLOCK('CT05');
     
ELSIF (:GLOBAL.HEADERS='CT06')THEN
     GO_BLOCK('CT06');
     
ELSIF (:GLOBAL.HEADERS='CT07')THEN
     GO_BLOCK('CT07');
     
ELSIF (:GLOBAL.HEADERS='CT08')THEN
     GO_BLOCK('CT08');
               
ELSIF (:GLOBAL.HEADERS='CT09')THEN
     GO_BLOCK('CT09');
               
ELSE --ELSIF (:GLOBAL.HEADERS='CT10')THEN
     GO_BLOCK('CT10');
     
END IF;

          END IF;
     END;
     
     


Thanks,
Durga Srinivas.

Edited by: DurgaSrinivas_886836 on Dec 3, 2012 8:12 PM
  • 1. Re: Tab pages not changed when selecting from TAB LIST
    MLBrown Journeyer
    Currently Being Moderated
    Your WHEN-TAB-PAGE-CHANGED trigger is only going to fire if the user presses on one of the tabs. If you are selecting the tab from a list, then you will need to add logic to a WHEN-LIST-CHANGED tigger as well.
  • 2. Re: Tab pages not changed when selecting from TAB LIST
    DurgaSrinivas_886836 Newbie
    Currently Being Moderated
    Hi

    How to Identify the tablist(when 15 tabs cannot be shown on 1 canvas , default FORMS Will show this tab list)?

    Durga Srinivas
  • 3. Re: Tab pages not changed when selecting from TAB LIST
    MLBrown Journeyer
    Currently Being Moderated
    Maybe I misunderstood you. When you say "tab list" is this a list-item or is this a list of the tabs that Oracle Forms automatically creates when there are too many tabs to display on the canvas? I assumed it was a list that you created.
  • 4. Re: Tab pages not changed when selecting from TAB LIST
    DurgaSrinivas_886836 Newbie
    Currently Being Moderated
    It is the list of the tabs that Oracle Forms automatically creates when there are too many tabs to display on the canvas.

    when i am printing a message

         :global.headers:=GET_CANVAS_PROPERTY('TAB_CANVAS', topmost_tab_page);
              
              fnd_message.debug('tabpage='||:global.headers);

    It is always Showing my first tab name(initially i am on tab 1).
  • 5. Re: Tab pages not changed when selecting from TAB LIST
    MLBrown Journeyer
    Currently Being Moderated
    In your trigger, you are doing a SHOW_VIEW ('HDR_CANVAS_FIXED'); before you select the :GLOBAL.HEADERS information. I'm not sure what HDR_CANVAS_FIXED is, but I am wondering if that is what is messing you up. What happens if you either comment that out:
    DECLARE
      l_curr_rec     NUMBER;
    BEGIN
      l_curr_rec := :SYSTEM.CURSOR_RECORD;
      
      --Get the Top Default Tab Page for the Form
      --SHOW_VIEW ('HDR_CANVAS_FIXED'); /* <-------------------------------------------------------Comment it out */
      :global.headers := GET_CANVAS_PROPERTY ('TAB_CANVAS', topmost_tab_page);
    
      IF (:GLOBAL.HEADERS = 'AS_REC_IMAGE') THEN
        SHOW_VIEW ('AS_REC_IMAGE');
        .
        .
        .
    or if it is necessary move it to after the :GLOBAL.HEADERS:
    DECLARE
      l_curr_rec     NUMBER;
    BEGIN
      l_curr_rec := :SYSTEM.CURSOR_RECORD;
      
      --Get the Top Default Tab Page for the Form
      :global.headers := GET_CANVAS_PROPERTY ('TAB_CANVAS', topmost_tab_page);
      SHOW_VIEW ('HDR_CANVAS_FIXED'); /* <------------------------------------ Swap it with :global.headers */
    
      IF (:GLOBAL.HEADERS = 'AS_REC_IMAGE') THEN
        SHOW_VIEW ('AS_REC_IMAGE');
        SET_VIEW_PROPERTY ('AS_REC_IMAGE', VISIBLE, PROPERTY_TRUE);
        SET_TAB_PAGE_PROPERTY ('AS_REC_IMAGE', ENABLED, PROPERTY_TRUE);
        GO_BLOCK ('AS_REC');
      --Hide the other canvases except the Pricing Canvas
      ELSIF (:GLOBAL.HEADERS = 'TRIM_REC_IMAGE') THEN
        SHOW_VIEW ('TRIM_REC_IMAGE');
        .
        .
        .
  • 6. Re: Tab pages not changed when selecting from TAB LIST
    Andreas Weiden Guru
    Currently Being Moderated
    try to use :SYSTEM.TAB_NEW_PAGE instead of GET_CANVAS_PROPERTY.
  • 7. Re: Tab pages not changed when selecting from TAB LIST
    DurgaSrinivas_886836 Newbie
    Currently Being Moderated
    Did the following changes

    Commented that SHOW_VIEW ('HDR_CANVAS_FIXED');[-- moved to new form instance trigger(required as top half of form is this canvas and bottom half is TAB canvas)].

    Added set-canvas-property for static tabs , it is working fine .[ex:  SET_CANVAS_PROPERTY('TAB_CANVAS',TOPMOST_TAB_PAGE,'AS_REC_IMAGE');]

    It is working fine now . Thank you .

    Durga Srinivas.

Legend

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