Class: Layout

Layout

new tart.mvc.Layout(view)

Layout class.

Name Type Description
view tart.mvc.View

View instance that will be rendered in this layout.

Members

body

contentArea

deconstructor

Deconstructor method of this layout. Developers should override this property in an action function like;

this.deconstructor = function() {}

and should deallocate the memory they have used in this layout. This is also helpful for resolving issues that arise because of tartMVC's statefullness; such as removed but dangling DOM nodes, etc.

markup

Default markup of a layout.

onRender

resetLayout

If resetLayout is true, the layout will be redrawn upon next action call whatever the circumstance.

view

Methods

getContent(){string}

Returns:
Type Description
string Current content of the layout.

getContentArea(body){Element}

Returns the content are element where the content will be placed.

Name Type Description
body Element
Returns:
Type Description
Element The main element the contents will reside in.

Renders the layout.

setContent(content)

Sets the content of the layout. This will generally be the output of a view script associated with an action.

Name Type Description
content string

Output of a view script.