Module: alfresco/lists/views/ListRenderer

alfresco/lists/views/ListRenderer

This module has been created to ensure that keyboard navigation (via the dijit/_KeyNavContainer) can be used without impacting the rest of the view. An instance of this module should be created within each list view (unless a view requires a specific renderer implementation).

This module can be extended if required to provide custom rendering of lists. In particular it may be necessary to override the bringItemIntoView function if an extending module lays out item in a non-vertical style (as the default behaviour is simply to scroll down until the requested item comes into view)

Author:
  • Dave Draper
License:
Source:

Members

templateString :String

The HTML template to use for the widget.
Type:
  • String
Source:

widgets :object[]

The widgets to be processed to generate each item in the rendered view.
Type:
  • object[]
Default Value:
  • null
Source:

Methods

_onChildBlur()

Overrides the _KevNavContainer function to call the "blur" function of the widget that has lost focus (assuming it has one).
Source:

bringItemIntoView(widget)

This function is called to bring a specific item into the users view. By default this is done by scrolling the item into view.
Parameters:
Name Type Description
widget object The widget to bring into view.
Source:

findScrollParent() → {element}

This function recursively searches out through the DOM to find the first parent of the supplied element that is capable of scrolling vertically and has scrollbars displayed.
Since:
  • 1.0.53
Source:
Returns:
The DOM element that is the scroll parent with scroll bars displayed
Type
element

onBringItemIntoView(payload)

This function is called whenever a parent list publishes a request to bring a specfic item into view, e.g. to ensure that a requested item that is displayed off the page is brought into view by automatically setting the scroll position. This function only checks to see whether or not the current widget represents that item - it does not perform the actual action to bring the item into view.
Parameters:
Name Type Description
payload object The details of the item to find
Source:

onItemFocused(evt)

Handles requests to focus a specific child item that has been clicked on. This is a custom event issued from a module mixing in the _MultiItemRendererMixin.
Parameters:
Name Type Description
evt object The click event
Source:

postCreate()

Implements the widget life-cycle method to add drag-and-drop upload capabilities to the root DOM node. This allows files to be dragged and dropped from the operating system directly into the browser and uploaded to the location represented by the document list.
Source:
Listens to Events:

setupKeyboardNavigation()

This sets up the default keyboard handling for a view. The standard controls are navigation to the next item by pressing the down key and navigation to the previous item by pressing the up key.
Source:

Events

ALF_BRING_ITEM_INTO_VIEW

Makes a request to bring a specific item into view, i.e. so that a previously actioned item is displayed when the list data updated. The payload contains a single attribute "item" that should be a value that will map to the itemKey of the renderer (which should be configured on the view).
Properties:
Name Type Description
item string This is an attribute value of the item that uniquely identifies it.
Source:
Listeners of This Event: