The interface implemented by page modules. The file is referenced using the "Page module" property of a page. Each page can have 0 or 1 page modules.
The page module instance can be accessed using the
pageModuleInstance
member of a page.
For an explanation of when events are called, see Order of Events.
Containment
Example
define( function() {
function PageModule()
{
};
PageModule.prototype.load = function( oPage )
{
};
PageModule.prototype.show = function( oPage )
{
};
PageModule.prototype.hide = function( oPage )
{
};
PageModule.prototype.destroy = function( oPage )
{
};
return PageModule;
});
Methods
destroy(oPage)
Called when the page is being destroyed.
This method is optional.
Parameters:
Name | Type | Description |
---|---|---|
oPage |
Page | The page. |
hide(oPage)
Called when the page is being hidden.
This method is optional.
Parameters:
Name | Type | Description |
---|---|---|
oPage |
Page | The page. |
load(oPage)
Called when the page is loaded. This can be used to set any required custom prompt validators.
This method is optional.
Parameters:
Name | Type | Description |
---|---|---|
oPage |
Page | The page. |
Example
Set a custom validator callback function
PageModule.prototype.load = function( oPage )
{
oPage.getControlByName( "txtZipCode" ).setValidator( fnZipCodeValidator );
}
show(oPage)
Called when the page is being shown/displayed.
This method is optional.
Parameters:
Name | Type | Description |
---|---|---|
oPage |
Page | The page. |