Caplin Trader 4.7.1

Class: module:caplin/element/renderer/StreamRenderer

module:caplin/element/renderer/StreamRenderer

Constructor

new module:caplin/element/renderer/StreamRenderer(rendererType, primaryFieldNames, control)

StreamRenderer is an abstract base class, therefore this constructor should not be directly invoked.

Instead, the RendererFactory should be used to create instances, which requires the RendererTypes to have been declared in XML and loaded using the RendererTypeLoader.

Parameters:
Name Type Description
rendererType module:caplin/element/factory/RendererType The renderer type.
primaryFieldNames Array The list of model field names.
control module:caplin/control/Control An instance of the screen control.
Implements:

Methods

bindHandlers()

Binds event listeners to the control for all the handlers, which will result in a callbacks to the onRendererEvent() method then any event occurs.

buildXhtml(mFieldValues, className)

Parameters:
Name Type Description
mFieldValues Object
className Object

getControl() → {module:caplin/control/Control}

Returns a control corresponding to the renderer.
Returns:
The control
Type
module:caplin/control/Control

getVariable(variableName) → {String}

Gets the renderer's variable.
Parameters:
Name Type Description
variableName String The variable name to retrieve.
Returns:
The variable value
Type
String

onRendererEvent(domEvent)

Event handler callback function that receives the events attached to the controls and defined in the handlers.

All control events call this function.

Parameters:
Name Type Description
domEvent Object The DOM event that was fired

refresh()

Apply all pending updates

resetUnformattedStreamValue()

Creates a null value for this renderer type

setSerialId(serialId)

Sets the serial id.
Parameters:
Name Type Description
serialId int The serial id

unbindHandlers()

Unbinds event listeners from the control for all the handlers.

updateStreamValues(fieldValuesMap)

Updates the renderer with the new value.
Parameters:
Name Type Description
fieldValuesMap Map The field values map.