This content has been marked as final. Show 3 replies
Unfortunately, there is no "Post-Tabpage-Changed" trigger. However, if the data displayed in your tab pages is organized by block - in that the data displayed in each tab page has its own unique data block and items in a blocks are not displayed on more than one tab page - then you could use the Block level "Post-Block" trigger to emulate a "Post-Tabpage-Changed" type of event you are looking for. The Post-Block trigger fires as focus moves off the current block so if you have one data block per tab page - changing tab pages would cause this trigger to fire.
Hope this helps,
If someone's response is helpful or correct, please mark it accordingly.
You can set a control item or global variable to hold default tab page LABEL in WHEN-NEW-FORM-INSTANCE and when focus moves to current tab, you read the global variable and reset it to current tab page label in the WHEN-TAB-PAGE-CHANGE trigger.
You'll need to initialize the global variable in WHEN-NEW-FORM-INSTANCE for default tab like below:
:GLOBAL.CURR_TAB := 'TabA';
Hope it helps!
DECLARE tp_nm VARCHAR2(30); tp_id TAB_PAGE; tp_lb VARCHAR2(30); prev_tab VARCHAR2(30) := :GLOBAL.CURR_TAB; BEGIN tp_nm := GET_CANVAS_PROPERTY('canvas3', topmost_tab_page); tp_id := FIND_TAB_PAGE(tp_nm); tp_lb := GET_TAB_PAGE_PROPERTY(tp_id, label); :GLOBAL.CURR_TAB := tp_lb; MESSAGE('Previous Tab: '||prev_tab||' Current Tab: '||:GLOBAL.CURR_TAB); MESSAGE('Previous Tab: '||prev_tab||' Current Tab: '||:GLOBAL.CURR_TAB); IF prev_tab = 'TabA' THEN <your code in case previous tab was TabA> ELSIF prev_tab = 'TabB' THEN <your code in case previious tab was TabB> END IF; END;
Edited by: Zaafran Ahmed on Oct 13, 2010 4:50 PM
Edited by: Zaafran Ahmed on Oct 14, 2010 8:37 AM