Class Index | File Index

Classes


Class M.PageView


Extends M.View.
M.PageView is the prototype of any page. It is the seconds 'highest' view, right after M.Application. A page is the container view for all other views.
Defined in: page.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
Indicates whether the page has a tab bar or not.
 
This property is used to specify a view's internal events and their corresponding actions.
 
States whether a page is loaded the first time or not.
 
An associative array containing all list views used in this page.
 
This property specifies the recommended events for this type of view.
 
The page's tab bar.
 
The type of this object.
Fields borrowed from class M.View:
childViews, computedValue, contentBinding, contentBindingReverse, cssClass, cssClassOnError, cssClassOnInit, cssStyle, events, hasFocus, html, id, isInline, isView, modelId, parentView, triggerActionOnChange, triggerActionOnEnter, triggerActionOnKeyUp, value
Method Summary
Method Attributes Method Name and Description
 
orientationDidChange(id, event, nextEvent)
This method is called right after the device's orientation did change.
 
pageDidHide(id, event, nextEvent)
This method is called right after the page was hidden.
 
pageDidLoad(id, event, nextEvent)
This method is called right after the page was loaded.
 
pageWillHide(id, event, nextEvent)
This method is called right before the page is hidden.
 
pageWillLoad(id, event, nextEvent)
This method is called right before the page is loaded.
 
This method is responsible for registering events for view elements and its child views.
 
This method writes the view's html string into the DOM.
Methods borrowed from class M.View:
addCssClass, attachToObservable, clearHtml, clearValue, clearValues, computeValue, contentDidChange, delegateValueUpdate, design, getChildViewsAsArray, getIds, getValue, getValues, gotFocus, lostFocus, nl2br, removeCssClass, removeCssProperty, renderUpdate, secure, setCssProperty, setValueFromDOM, style, tab2space, theme, themeChildViews
Methods borrowed from class M.Object:
bindToCaller, create, destroy, extend, get, include, set
Class Detail
M.PageView()
Field Detail
{Boolean} hasTabBarView
Indicates whether the page has a tab bar or not.

{Object} internalEvents
This property is used to specify a view's internal events and their corresponding actions. If there are external handlers specified for the same event, the internal handler is called first.

{Boolean} isFirstLoad
States whether a page is loaded the first time or not. It is automatically set to NO once the page was first loaded.

{Object} listList
An associative array containing all list views used in this page. The key for a list view is its id. We do this to have direct access to a list view, so we can reset its selected item once the page was hidden.

{Array} recommendedEvents
This property specifies the recommended events for this type of view.

{M.TabBarView} tabBarView
The page's tab bar.

{String} type
The type of this object.
Method Detail
orientationDidChange(id, event, nextEvent)
This method is called right after the device's orientation did change. If a action for orientationchange is defined for the page, it is now called.
Parameters:
{String} id
The DOM id of the event target.
{Object} event
The DOM event.
{Object} nextEvent
The next event (external event), if specified.

pageDidHide(id, event, nextEvent)
This method is called right after the page was hidden. If a onHide-action is defined for the page, it is now called.
Parameters:
{String} id
The DOM id of the event target.
{Object} event
The DOM event.
{Object} nextEvent
The next event (external event), if specified.

pageDidLoad(id, event, nextEvent)
This method is called right after the page was loaded. If a onLoad-action is defined for the page, it is now called.
Parameters:
{String} id
The DOM id of the event target.
{Object} event
The DOM event.
{Object} nextEvent
The next event (external event), if specified.

pageWillHide(id, event, nextEvent)
This method is called right before the page is hidden. If a beforeHide-action is defined for the page, it is now called.
Parameters:
{String} id
The DOM id of the event target.
{Object} event
The DOM event.
{Object} nextEvent
The next event (external event), if specified.

pageWillLoad(id, event, nextEvent)
This method is called right before the page is loaded. If a beforeLoad-action is defined for the page, it is now called.
Parameters:
{String} id
The DOM id of the event target.
{Object} event
The DOM event.
{Object} nextEvent
The next event (external event), if specified.

registerEvents()
This method is responsible for registering events for view elements and its child views. It basically passes the view's event-property to M.EventDispatcher to bind the appropriate events. It extend M.View's registerEvents method with some special stuff for page views and its internal events.

writeToDOM()
This method writes the view's html string into the DOM. M.Page is the only view that does that. All other views just deliver their html representation to a page view.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 25 2012 20:41:10 GMT+0100 (MEZ)