Page Events
The Reference Framework provides events associated with the life cycle of the page. These events provide hooks for initialization and cleanup of logic associated with the pages, as well as a means for controlling navigation to and from a page.
onPageLoaded
The onPageLoaded event is fired once when a page is loaded. This provides a means for initializing any code associated with the page.
Applies To
• SDI
• Windows
• Tabs
Parameters
• pageId – the page id of the page being loaded
Return Value
None
onPageClosed
The onPageClosed event is fired once when a page is closed. This provides a means for cleaning up any code associated with the page.
Applies To
• SDI
• Windows
• Tabs
Parameters
• pageId – the page id of the page being loaded
Return Value
None
onPageActivated
The onPageActivated event is fired when a page gains focus. This event provides a mechanism for initialize a page when gaining focus from another tab.
Applies To
• SDI
• Windows
• Tabs
Parameters
• pageId – the page id of the page being loaded
Return Value
None
Notes
An onPageActivated() event will be fired after the page is first loaded.
For SDI, this will be the only time that the onPageActivated() event is fired.
For Windows and Tabs, the onPageActivated() event will be fired whenever the page regains focus.
onBeforePageClosed
The onBeforePageClosed event is fired before the page is closed. This allows for one time validation and processing of the page and a means for keeping the page from closing.
Applies To
• SDI
• Windows
• Tabs
Parameters
• pageId – the page id of the page being loaded
Return Value
None
onPageDeactivated
The onPageDeactivated event is fired when a page is loses focus. This allows for validation and processing of the page and can allow the page to remain active.
Applies To
• SDI
• Windows
• Tabs
Parameters
• pageId – the page id of the page being loaded
Return Value
None
Notes
An onPageDeactivated() event will be fired before the page is closed.
For SDI, this will be the only time that the onPageDeactivated() event is fired.
For Windows and Tabs, the onPageDeactivated() event will be fired whenever the page loses focus.