org.visallo.entity.listItemRenderer

Implement custom implementations for rendering items into element lists

This allows plugins to adjust how list items are displayed in search results, details panels, or anywhere else the lists are used.

Requires either component or componentPath.

The item property passed to Component can differ depending on usageContext.

usageContext == 'detail/relationships' => { vertex, relationship }
usageContext == 'searchresults' => The element

Registration

registry.registerExtension("org.visallo.entity.listItemRenderer", config)

Source:
Tutorials:
See:
Configuration Properties:
Name Type Attributes Description
canHandle canHandle

Whether the extension should run given an item and usageContext

component Component <optional>

The FlightJS component to handle rendering

componentPath string <optional>

Path to org.visallo.entity.listItemRenderer~Component

Validation Function

Extensions registered must pass this validation check to be used.

function extensionValidator(e) {
    return _.isFunction(e.canHandle) && (e.component || e.componentPath);
}

Type Definitions

canHandle(item, usageContext) → {boolean}

Source:

Defines whether the given extension should be used give the item + usageContext pair.

Parameters:
Name Type Description
item object

Element/Edge object

usageContext string | undefined

The context this list is running. 'search, detail/relationships', etc.

Returns:

If the extension renderer should be invoked

Type
boolean

Component

Source:

Flight Component that handles row rendering for a given item and usageContext.

Properties:
Name Type Description
item object

The rows item value

usageContext string

The context of this element list

Listens:

Events

loadPreview

Source:

Triggered on all org.visallo.entity.listItemRenderer~Component components when the user scrolls to make the row visible.

The component should render any images, or make any auxillary requests.

This event might be triggered more than once, use _.once or another method to only take action once.

Example
this.on('loadPreview', _.once(this.onLoadPreview.bind(this)));
Listeners of This Event: