Caplin Trader 5.1.0

Class: module:br-presenter/util/ErrorMonitor

module:br-presenter/util/ErrorMonitor(Node)

ErrorMonitor is responsible for monitoring the status of fields that contain an error and failure message property. It is used to set the tool tip class that the tooltip control will scan in order to create the tool tip box.

Constructor

new module:br-presenter/util/ErrorMonitor(Node)

Parameters:
Name Type Description
Node module:br-presenter/node/ToolTipNode

representing the tool tip model.

Methods

addErrorListeners()

Filters all nodes of type {@see br-presenter/node/ToolTipField} and monitors them using {@see ErrorMonitor#monitorField}

forgetField(oField)

Removes the automatic monitoring of the supplied Field, and removes it from the list of current errors if the field is currently in an error state.

Parameters:
Name Type Description
oField module:br-presenter/node/Field

monitorField(oField)

Monitors a Field to automatically add it as an error when it enters an error state and remove it once that error is resolved.

Parameters:
Name Type Description
oField module:br-presenter/node/ToolTipField

removeErrorListeners(pGroups)

removes all error subscriptions for the given fields

Parameters:
Name Type Description
pGroups Array

fields we want to forget