11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

When-Tab-Page-Changed trigger<br />

Description<br />

Fires whenever there is explicit item or mouse navigation from one tab page to another in a tab canvas.<br />

Definition Level form<br />

Legal Commands<br />

unrestricted built-ins, restricted built-ins<br />

Enter Query Mode no<br />

Usage Notes<br />

• Use a When-Tab-Page-Changed trigger to perform actions when any tab page is changed during<br />

item or mouse navigation.<br />

• When-Tab-Page-Changed fires only when tab page navigation is explicit; it does not respond to<br />

implicit navigation. For example, the trigger will fire when the mouse or keyboard is used to<br />

navigate between tab pages, but the trigger will not fire if an end user presses [Next Item] (Tab) to<br />

navigate from one field to another field in the same block, but on different tab pages.<br />

• When-Tab-Page-Changed does not fire when the tab page is changed programmatically.<br />

On Failure<br />

no effect<br />

When-Tab-Page-Changed examples<br />

Example<br />

/* Use a When-Tab-Page-Changed trigger to dynamically<br />

** change a tab page’s label from lower- to upper-case<br />

** (to indicate to end users if they already have<br />

** navigated to the tab page):<br />

*/<br />

DECLARE<br />

tp_nm VARCHAR2(30);<br />

tp_id TAB_PAGE;<br />

tp_lb VARCHAR2(30);<br />

BEGIN<br />

tp_nm := GET_CANVAS_PROPERTY(’emp_cvs’, topmost_tab_page);<br />

tp_id := FIND_TAB_PAGE(tp_nm);<br />

tp_lb := GET_TAB_PAGE_PROPERTY(tp_id, label);<br />

IF tp_lb LIKE ’Sa%’ THEN<br />

SET_TAB_PAGE_PROPERTY(tp_id, label, ’SALARY’);<br />

ELSIF tp_lb LIKE ’Va%’ THEN<br />

SET_TAB_PAGE_PROPERTY(tp_id, label, ’VACATION’);<br />

ELSE null;<br />

END IF;<br />

END;<br />

525

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!