new View()

Description

Subset of SuiteCommerce View exposed for Extensions developers for declaring new views, adding child-views, etc.

Internally is implemented with Backbone.View which is enhanced with handlebars templates, render plugins, context,
SEO, composition, navigation, etc.

Members


template :function|String

Description

The template for this view, in general a function that accepts this view context object and returns an HTML string.
If it is a string an AMD module with that name is tried to be loaded.
If it is undefined the view will be rendered without errors as an empty string


events :Object|Object


bindings :Object

Methods


initialize( ...options ) → {void}

Description

this is executed when a new view is instantiated - equivalent to the instance contructor.

Parameters
Name Type Attributes Description
options any <repeatable>
Returns

render() → {void}

Returns

getContext() → {Object}

Description

Returns the object which will be consumed by this view's template

Returns

destroy() → {void}

Returns

extend( view_definition )

Parameters
Name Type Description
view_definition View

an object with some of this class members.