Caplin Trader 5.1.0

Class: module:ct-grid/decorator/LoadingDataDecorator

module:ct-grid/decorator/LoadingDataDecorator(decoratorConfig)

new module:ct-grid/decorator/LoadingDataDecorator(decoratorConfig)

Constructs a LoadingDataDecorator instance — end-users will never need to do this themselves since grids are fully constructed based on their XML definition files by the module:ct-grid/GridComponentFactory class.

The LoadingDataDecorator renders a spinning wait icon whenever the grid is waiting for data to arrive, so that users can see what is happening. The showInitialLoad attribute within the <loadingDataDecorator/> tag, can be used to control whether a spinning icon will be displayed the first time the grid is loaded — this will cause pages that contain grids to load more slowly than they otherwise would.

This class displays the image source/images/grid/loadingIcon.gif to show that loading is in progress. It also uses the following CSS classes to position the image and provide futher look and feel enhancements:

  • loadingIconContainer dataLoading - CSS class assigned to the HTML element that contains the loading icon whilst the grid is awaiting the initial response to the request for row data.
  • loadingIconContainer dataLoaded - CSS class assigned to the HTML element that contains the loading icon after the initial response to the request for row data has been received.
  • loadingIcon - CSS class assigned to the loading icon's HTML image element.
Parameters:
Name Type Description
decoratorConfig object

config object

Properties
Name Type Attributes Default Description
showInitialLoad boolean <optional>
true
Implements:

Methods

onClose()

Implements:
See:

onContainerHtmlRendered()

Implements:
See:

setGridView()

Implements:
See: