The WHEN_TAB_PAGE_CHANGED event is a form level trigger that fires when the page is explicitly changed by mouse navigation and clicking. The trigger will not fire if the tab page is implicitly changed via tab movement or programmatic change. For example, the trigger will fire when the mouse or keyboard is used to navigate between tab pages, but the trigger will not fire if an end user presses [Next Item] (Tab) to navigate from one field to another field in the same block, but on different tab pages.
Here's an example (from Form Builder help) showing how to change a tab page's label to uppercase to indicate to the user they have navigated to that page.
DECLARE 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 SET_TAB_PAGE_PROPERTY(tp_id, label, 'SALARY'); ELSIF tp_lb LIKE 'Va%' THEN SET_TAB_PAGE_PROPERTY(tp_id, label, 'VACATION'); ELSE null; END IF; END;
For More Information
- What do you think about this answer? E-mail the editors at editor@searchDatabase.com with your feedback.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
This was first published in April 2002