Ask the Expert

Using the WHEN_TAB_PAGE_CHANGED trigger

Could you explain how to use the trigger WHEN_TAB_PAGE_CHANGED? I made a tab form with many tab pages, and I would like to help the user when he presses on the tab to give him indication that he on this tab, not the other one. How can I use that trigger?

    Requires Free Membership to View

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.

  tp_nm   VARCHAR2(30);
  tp_id   TAB_PAGE;
  tp_lb   VARCHAR2(30);

  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;

For More Information

  • What do you think about this answer? E-mail the editors at 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

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: