Caplin Trader 4.7.1

Class: module:caplin/menu/Generator

module:caplin/menu/Generator

The class caplin.menu.Generator represents the view control for any module:caplin/menu/Model inserted on a menu.
Keep in mind that a single caplin.menu.Generator will be contained inside the module:caplin/menu/Control to render every model type.

Constructor

(abstract) new module:caplin/menu/Generator()

Methods

addParentControl()

Sets the parent control. This will be done automatically by the module:caplin/menu/Control.

create(model, container)

Appends the html element representation of the given model to the provided container.
Parameters:
Name Type Description
model module:caplin/menu/Model The model.
container HTMLElement The container element.

destroy()

Release any memory that the control holds.

getParentControl() → {module:caplin/menu/Control}

Returns the parent control. Use this method in order to be able to call the append method from other generator types.
Returns:
The parent control.
Type
module:caplin/menu/Control