Caplin Trader 5.1.0

Interface: module:ct-watchlist/Watchlist

module:ct-watchlist/Watchlist

A watchlist is a named collection of records that a user wishes to view, typically in a grid.

To add or remove records from a watchlist, use its module:ct-watchlist/WatchlistContentsManager which is accessible via module:ct-watchlist/Watchlist#getContentsManager.

Methods

getContentsManager() → {module:ct-watchlist/WatchlistContentsManager}

Returns a module:ct-watchlist/WatchlistContentsManager for this watchlist. This can then be used to modify the contents of the watchlist.

Returns:

may be used to modify the watchlist. contents.

Type
module:ct-watchlist/WatchlistContentsManager

getId() → {string}

A unique identifier for this watchlist.

See:
Returns:

This watchlist's id.

Type
string

getName() → {string}

The user-friendly name chosen for this watchlist. This will typically have been chosen by the user when the watchlist was created.

Returns:

This watchlist's user-friendly name.

Type
string

getSubject() → {string}

The subject of this watchlist's container record. This can be used to create a subscription to the watchlist's contents.

Returns:

This watchlist's subject.

Type
string

setName(name, erroropt, successopt)

Sets the user-friendly name for this watchlist.

Parameters:
Name Type Attributes Description
name string

The new user-friendly name for this watchlist.

error function <optional>

function to be called if the operation fails.

success function <optional>

function to be called when the operation completes successfully.

setPosition(position, erroropt, successopt)

Sets the watchlist's position.

Parameters:
Name Type Attributes Description
position integer

the watchlist position index (0 based)

error function <optional>

function to be called if operation fails

success function <optional>

function to be called if operation succeeds

Throws:

If position argument is not an integer.

Type
module:br/Errors.INVALID_PARAMETERS