Problem with two tab canvases in a form [message #587749] |
Tue, 18 June 2013 06:42 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/9c6e4810a270eb5790de7f54d64fac8e?s=64&d=mm&r=g) |
pramod.sramesh
Messages: 23 Registered: November 2011 Location: Bangalore
|
Junior Member |
|
|
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;
[EDITED by LF: applied [code] tags]
[Updated on: Wed, 19 June 2013 01:05] by Moderator Report message to a moderator
|
|
|
Re: Problem with two tab canvases in a form [message #587851 is a reply to message #587749] |
Wed, 19 June 2013 01:07 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Open Forms Online Help system and search for WHEN-TAB-PAGE-CHANGED trigger. It contains an example (excerpt follows) which might help. It is not the "topmost_tab_page" you need, but its label:
tp_nm VARCHAR2(30);
tp_id TAB_PAGE;
tp_lb VARCHAR2(30);
BEGIN
tp_nm := GET_CANVAS_PROPERTY('emp_cvs', topmost_tab_page);
tp_id := FIND_TAB_PAGE(tp_nm);
tp_lb := GET_TAB_PAGE_PROPERTY(tp_id, label);
IF tp_lb LIKE 'Sa%' THEN
...
|
|
|