Namespace Presto .view
Namespace for the Presto View API. See also
Sample.view.MySample for theView API methods that a
custom view library must implement.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
Presto.view.getRows(dataTable, columnInfo, options)
|
<static> |
Presto.view.getRowValue(row, name)
|
<static> |
Presto.view.register(config)
|
<static> |
Presto.view.trigger(el, event, data)
|
Method Detail
<static>
Presto.view.getRows(dataTable, columnInfo, options)
- Parameters:
- {Object} dataTable
- Reference to the existing Presto.DataTable instance for this view.
- {Array} columnInfo
- Array of one or more data-column configuration objects for this view. This is applied to DataTable rows to return formatted rows.
- {Object} options
- An optional object containg the following data extraction options:
- {boolean} options.flatten
- If true, flatten the row data in this DataTable. By default row data may contain complex (nested) data objects.
<static>
Presto.view.getRowValue(row, name)
- Parameters:
- {Object} row
- Reference to the row containing the named cell with the value to extract.
- {String} name
- The cell name or path to the cell, if row or cell content is complex.
<static>
Presto.view.register(config)
- Parameters:
- {Object} config
- A configuration object for this custom view library with these properties:
- {String} config.lib
- The ID to assign in Presto for this view library.
- {String or Function} config.cls
- Either the name of the view constructor function for this custom view library or a reference to the view constructor function.
- {Array} config.events
- An optional array of the names of view-specific events generated by this view library, such as a click event emmitted when part of the view detects a mouse click.
<static>
Presto.view.trigger(el, event, data)
- Parameters:
- {String or Object} el
- The CSS selector, ID or DOM node for the view container.
- {String} event
- The name of the event to raise.
- {Object} data
- The event object for this event.