Caplin Trader 5.1.0

Class: module:br-presenter/component/PresenterComponent

module:br-presenter/component/PresenterComponent(sTemplateId, vPresentationModel)

When component life cycle events are triggered on the PresenterComponent these are proxied through to the PresentationModel if they are defined in the PresentationModel.

Constructor

new module:br-presenter/component/PresenterComponent(sTemplateId, vPresentationModel)

Constructs a new instance of PresenterComponent. Instances of PresenterComponent can also be created from an XML snippet using the module:br-presenter/component/PresenterComponent#deserialize method.

Parameters:
Name Type Description
sTemplateId String

The id of a template to render the presentation model with.

vPresentationModel Object

A presentation model instance, or the name of a presentation model class that can be constructed.

Implements:

Methods

deserialize(sPresenterData)

Extracts the data inside the presenter tag and gives it to the PresentationModel for deserialization. Only has affect if the Presentation Model implements module:br-presenter/SerializablePresentationModel.

Parameters:
Name Type Description
sPresenterData String

The presenter xml node in string format

getPresentationModel()

Retrieve the presentation model being displayed by this component.

isViewAttached()

Returns true once br-component/Frame#onOpen has fired, and the display element has been attached to the page.

setDisplayFrame(frame)

Parameters:
Name Type Description
frame module:br-component/Frame

A frame provided by the layout manager that this component can attach its visual DOM elements into. Will be called only once.

Implements: