Class
caplin.grid

WebServiceGridDataProvider

This class can be used to supply a caplin grid's 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%",""]
	]
 }
}

Constructor Summary

Attributes Name and Description
caplin.grid.WebServiceGridDataProvider()

Constructs a new WebServiceGridDataProvider with the specified arguments.

Method Summary

Attributes Name and Description
Array getDataForAllRows()

Returns an array of objects, each containing row record data

Array getDataSetFields()

Returns the fields for which this data provider can provide data for.

Methods implemented from class caplin.grid.GridDataProvider:
addDataProviderListener, clearFilterExpression, clearGroupByField, clearSortRule, configureDataProvider, getAllFilterExpressions, getFilterExpression, getGroupByField, getPermissionKey, getSerializedState, getSortRule, getStartIndex, getSubjectIdentifiers, getTransformMode, injectData, pauseUpdates, removeDataProviderListener, requestAllData, resumeUpdates, setFilterExpression, setFilters, setGridView, setGroupByField, setRequiredFields, setRowData, setRowRange, setSortRule, setTransformMode, supportsFeature, terminateUpdates
Methods from caplin.component.InstrumentReceiver:
canReceive, canReceiveMultipleObjects, canReceiveObjects, getLastReceiveFailureMessage, getSuccessMessage, receiveObjects

Constructor Detail

caplin.grid.WebServiceGridDataProvider()

Constructs a new WebServiceGridDataProvider with the specified arguments.

Method Detail

Array getDataForAllRows()

Returns an array of objects, each containing row record data

Returns
an array of objects, each containing row record data

Array getDataSetFields()

Returns the fields for which this data provider can provide data for.

Returns
{Array} the fields for which this data provider can provide data for