Caplin Trader 4.8.0

Class: module:caplin/grid/WebServiceGridDataProvider

module:caplin/grid/WebServiceGridDataProvider

Constructor

new module:caplin/grid/WebServiceGridDataProvider()

Constructs a new WebServiceGridDataProvider with the specified arguments.

This class can be used to supply a caplin grid's module:caplin/grid/DataProviderRowModel with data retrieved from a web service.

An example web service can be found in the reference implementation (/source/services/historicalSnapshotJson.jsp) A grid web service should respond to queries with row data in a json format. An example is shown below.

{
  "dataSet": {
		  "fields" : ["Category","Date","Value","SubHeaderText"],
  "data" : [
		  ["","","","Short-term Bank Rates"],
		  ["EUR Repo","05/11/2008","3.75%",""],
		  ["EONIA","05/11/2008","3.75%",""]
	]
 }
}
Implements:

Methods

getDataForAllRows()

Returns an array of objects, each containing row record data
Returns:
an array of objects, each containing row record data

getDataSetFields() → {Array}

Returns the fields for which this data provider can provide data for.
Returns:
the fields for which this data provider can provide data for
Type
Array