JavaScript API
Placing the SheetView component on a Visualforce page globally exposes the MsmxSheet
JavaScript object in the page. By making an API call from this object, it is possible to dynamically control Sheet's behavior and rendering.
API Methods
setApplicationParameter(params, options)
This API sets the application parameters for the Sheet application. Application parameters can be specified as references when specifying filter values. If the reference for the appropriate parameter is set in the filter, the reference is replaced with the value of the parameter and the sheet display is automatically refreshed.
In the filters for text type or ID type field, and advanced filters, the values of application parameters can be specified as reference and used as filter values. See "Using Reference Value in Filter" for more information.
Parameters
params - (required) Pass application parameter names and its values in Key-Value pairs.
options - (optional) Option parameters. With the
forceLoad
option property you can force the data refresh
updateApplicationParameter(params, options)
Update application parameter values set in the Sheet Application. The difference with setApplicationParameter
is that it replaces only the value of specified parameters and others will be remained as previous.
Parameters
params - (required) Pass application parameter names and its values in Key-Value pairs.
options - (optional) Option parameters. With the
forceLoad
option property you can force the data refresh
subscribeComponentEvent(compId, path, event, listener)
Set a listner function to subscribe events fired from the sheet in the component of msmxSheet:SheetView
.
Parameters
compId - (required) Target component ID (specified in id attribute of
msmxSheet:SheetView
component tag)path - (required) Concatenation of Book ID and Sheet ID with "/"
event - (required) Event name to subscribe
listener - (required) Listener function which will be notified by the event
unsubscribeComponentEvent(compId, path, event, listener)
Unset listener functions to unsubscribe events fired from the sheet in the component of msmxSheet:SheetView
.
Parameters
compId - (required) Target component ID (specified in id attribute of
msmxSheet:SheetView
component tag)path - (required) Concatenation of Book ID and Sheet ID with "/"
event - (required) Event name to subscribe
listener - (optional) Listener function registered in subscription. If omit this all listeneres for the event will be unsubscribed.
Event Types
selectRecords
Event which will be notified when the selection of records has changed.
Event Parameters
records - List of records selected
loadComplete
Event which will be notified when the records are loaded.
Event Parameters
records - List of records loaded
focusCell
Event which will be notified when a cell in the sheet is focused (for example by clicking).
Event Parameters
cell - Stores information about the focused cell
recordId - The ID of the record shown in focused cell
colIndex - Column index position of the cell
rowIndex - Row index position of the cell (in all pages)
value - The raw value of the item displayed in the cell
Last updated