Rollist class

Rollist(host, oOptionsopt)

new Rollist(host, oOptionsopt)

The ExRollist/JS component is an interactive list control that arranges its items along the path of an ellipse. As users navigate through the list, the selected item is automatically positioned and displayed at the center of the control, ensuring maximum visibility and focus. This layout creates a smooth and visually engaging experience when browsing items.

Features include:

  • Elliptical Layout, items are arranged along an elliptical path for a modern, visually engaging presentation (supports liner arrangement as well)
  • Centered Selection, ihe selected item is always displayed in the center of the control for better visibility and focus
  • Smooth Scrolling & Animation, offers smooth, animated transitions when navigating through items
  • Filter Support, allows users to filter items dynamically as they type characters to match
  • Mouse & Touch Support, fully interactive via mouse wheel and touch gestures such as swipe or drag
  • Customizable Items, items can include rich HTML content, images, or custom styles
  • Keyboard Navigation, allows users to navigate the list using keyboard input (e.g., arrow keys)
  • Lightweight & Fast, designed for performance, even with large numbers of items
  • Responsive Design, automatically adapts to the size of its container for flexible integration
The ExRollist/JS is a HTML standalone-component, written in JavaScript, that uses no third-party libraries.

Every option of the Rollist.Options type has associated a property of the control. For instance, the option:

allowActions {string}, customizes the actions the user can perform once the user clicks or touches the control
is associated with the property:
AllowActions {string}, customizes the actions the user can perform once the user clicks or touches the control
which means that the following statements are equivalent:
oRollist.Options = {allowActions: "scroll"}
oRollist.SetOptions({allowActions: "scroll"})
oRollist.AllowActions = "scroll"
oRollist.SetAllowActions("scroll")
where oRollist is an object of Rollist type
Parameters:
Name Type Attributes Description
host any The host parameter specifies the HTML element hosting the control. It can be one of the following:
  • {string}, specifies the identifier of the document element hosting the control
  • {HTMLElement}, indicates the actual document element hosting the control
When the HTML element hosts the control, it automatically receives the class name 'exrollist'. Each item displayed within the control is assigned the class name 'exrolitem', and the item that is currently selected will have the class name 'selected'. You can use the following class names to customize the appearance of different elements within the control:
  • exrollist, this is the class name for the HTML element that serves as the container or host for the entire control. It wraps the entire control and holds all items.
  • exrolitem, this is the class name for each individual item within the control. It applies to the HTML elements that represent each item listed in the control. The Misc.tagName specifies the type of HTML element to be created for hosting the item. The className property of the item defines any additional class names to be applied to the HTML element, allowing for further customization of its styling.
  • selected', this is the additional class name applied to the currently selected item (exrolitem). The selected item is always positioned at the center of the control, making it the focal point of the interaction. You can use the Misc.selectPos to define the vertical ratio for where the selected item is displayed, ranging from -1 (top) to 1 (bottom), with 0 indicating the center
Additionally, the control supports the following classes:
  • exrolfilter, this is the class name for the HTML element that contains the control's filter. The filter allows the user to match typed characters. By default, the filter consists of a label, an input element, and a span. The label is used to specify a description, such as "Filter For...", the input (of type text-box) holds the filter pattern, and the span displays the close button. The structure is: "<label for='rofilter'></label><input type='textbox' id='rofilter'><span>&#10006;</span>". For example, the CSS rule ".exrolfilter label::after { content: 'Filter for: '; color: gray; }" shows "Filter For..." in gray to the left of the input. The Rollist#SetAllowFilterInput option specifies whether the control displays a filter bar, enabling the user to filter items by typing text.
  • exroloccur, this is the class name for the SPAN element that highlights matching patterns within the items, allowing customization. By default, the highlight appears with a yellow background.
  • hidden, this is the class name used to hide HTML elements. By default, the CSS rule is {display: none;}
oOptions object <optional>
An object of Rollist.Options type that defines different options to display the control.
Requires:
  • module:exontrol.commmon.min.js
Rollist

Requires

  • module:exontrol.commmon.min.js

Classes

Options

Members

Listeners :exontrol.Lts

The Listeners field defines the items of the control, as an object of exontrol.Lts type. The exontrol.Lts type supports forEach(callback, thisArg) method that helps you to enumerate the items the control supports. The Items section lists the items the component supports.
Type:
  • exontrol.Lts
Example
The following sample shows how you can get all items the component currently supports:

oRollist.Listeners.forEach(function(name)
{
 console.log(name);
});

The following samples handle the "onload" event:

oRollist.Listeners.Add("onload", function (oEvent)
{
 console.log(oEvent);
});

or

oRollist.on("load", function (oEvent)
{
 console.log(oEvent);
});

where oRollist is an object of Rollist type
Listeners

(static, readonly) AllowFilterInputEnum :number

The Rollist.AllowFilterInputEnum type defines the options and flags that control the visibility of the filter input in the control.
Type:
  • number
Properties:
Name value Type Description
exHide 0 number No filter input is visible
exAlwaysVisible 1 number The filter input is always visible, the close button is not displayed
exShowOnAnyKey 2 number Displays the filter input when the user presses a key, along with a close button. Requires the HTML element hosting the control to include the tabindex attribute to receive keyboard focus.
exDisableHighlightOccurences 16 number Disables the highlighting of all occurrences of the typed text within the items, which otherwise helps users visually identify matching content.

(static) type :string

The type field defines the full-name of the object (the constructor.name does not give the same name for minimized forms). The Rollist.type member always returns "Rollist"
Type:
  • string

(static) version :string

The version field defines the version of the control. The current version is 4.4
Type:
  • string

Methods

BeginUpdate()

The BeginUpdate() method suspends the control's render until the EndUpdate() method is called. It maintains performance, while multiple changes occurs within the control. You can use the Update() method to perform multiple changes at once.
BeginUpdate

CloseFilterInput()

The CloseFilterInput() method hides and clears the filter input field, effectively removing it from view and disabling the filtering functionality. It also clears any active filter.
CloseFilterInput

EndUpdate()

The EndUpdate() method resumes the control's render, after it is suspended by the BeginUpdate() method.
EndUpdate

GetAllowActions() → {string}

The GetAllowActions() method gets the actions the user can perform once the control is clicked or touched
Returns:
Returns the actions the user can perform once the control is clicked or touched. The format of allowActions field is:
"action(shortcut,shortcut,...),action(shortcut,shortcut,...)..."
where
  • "action", indicates the name of the action. The "action" can have any of the following values:
    • "scroll", scrolls the control by drag and drop
  • "shortcut", defines the event's button or/and the modifier-keys that are required to perform the action. The "shortcut" is a combination of none, one or more of the following values:
    • "Shift", indicates that the SHIFT key is pressed
    • "Ctrl" or "Control", indicates that the CTRL key is pressed
    • "Alt" or "Menu", indicates that the ALT key is pressed
    • "Meta" , indicates that the META key is pressed
    • "LButton", specifies that the mouse's left-button is pressed
    • "RButton", specifies that the mouse's right-button is pressed
    • "MButton", specifies that the mouse's middle/wheel-button is pressed
    • "Long", specifies that the action requires a "long" click or touch before it begins
    • "Double", specifies that the action requires a "double" click before it begins (this flag is available for non-dragable actions only such as "edit")
    • "+", indicates AND between values
Type
string
GetAllowActions

GetAllowFilterInput() → {Rollist.AllowFilterInputEnum}

The GetAllowFilterInput() method specifies whether the control displays a filter bar, enabling the user to filter items that contain the typed text.
Returns:
Returns a value from the AllowFilterInputEnum that indicates the current filter input mode. Possible values include:
  • exHide (0), no filter input is visible
  • exAlwaysVisible (1), the filter input is always visible, without a close button
  • exShowOnAnyKey (2), displays the filter input when the user presses any key, including a close button. Requires the host HTML element to have a tabindex attribute for keyboard focus
  • exDisableHighlightOccurences (0x10), disables the highlighting of all occurrences of the typed text within the items, which otherwise helps users visually identify matching content.
Type
Rollist.AllowFilterInputEnum
GetAllowFilterInput

GetCyclic() → {boolean}

The GetCyclic() method indicates whether the items are displayed in a continuous loop.
Returns:
Returns true if the items are displayed in a continuous loop
Type
boolean
GetCyclic

GetFilter() → {string}

The GetFilter() method specifies the filter to be applied to the items, ensuring that only items matching the filter criteria are shown.
Returns:
Returns the filter to be applied to the items
Type
string
GetFilter

GetItems() → {Items}

The GetItems() method returns the control's items.
Returns:
Returns an object of Items type.
Type
Items
Example
The following statements are equivalents:

 oRollist.GetItems() {Items}, returns the control's items
 oRollist.Items {Items}, returns the control's items

where oRollist is an object of Rollist type
GetItems

GetMisc() → {MiscellaneousOptions}

The GetMisc() method indicates the control's miscellaneous options
Returns:
Returns the control's miscellaneous options
Type
MiscellaneousOptions
GetMisc

GetOptions() → {object}

The GetOptions() method returns the current options of the control.
Returns:
An object of Rollist.Options type that indicates the options to display the control.
Type
object
GetOptions

GetSelect() → {Item}

The GetSelect() method gets the item that is currently selected, which is always displayed at the center of the control
Returns:
Returns the selected item, which is always displayed at the center of the control
Type
Item
GetSelect

GetSmooth() → {number}

The GetSmooth() method defines the time in ms the control goes from one layout to another.
Returns:
Returns the time in ms the control goes from one layout to another.
Type
number
GetSmooth

GetWheelChange() → {number}

The GetWheelChange() method defines the amount the control scrolls when the user rolls the mouse wheel.
Returns:
Returns the amount the control scrolls when the user rolls the mouse wheel.
Type
number
GetWheelChange

Import(source, importOptsopt)

The Import() method imports data from CSV format. The SetData(value) method is equivalent with Import(value) method.
Parameters:
Name Type Attributes Description
source any The source parameter may be one of the following:
  • A String expression that specifies the URL to a CSV file (contains no eof, eor or str)
  • A String expression in CSV format
  • An object that includes the "files" member of FileList type (a local file)
  • An array of data to load
importOpts object <optional>
The importOpts parameter specifies options to import data into the control as object of ImportOptions type.
Properties
Name Type Description
limit number specifies the maximum number of rows/items/lines to import
format string determines the format of source to import data from
eor string | RegExp specifies the delimiter, which can be a character, string, or regular expression (@since 4.4), used to identify the end of a row, item, or line during parsing (has effect only if format field is "CSV")
eof string specifies the character to separate fields within the row/item/line (has effect only if format field is "CSV")
str string specifies the character to quote values (has effect only if format field is "CSV")
hdr boolean indicates whether the first line in data represents the control's header (has effect only if format field is "CSV")
Import

Item(id) → {Item}

The Item() method returns the item based on its index or identifier/key. The Item(id) method is equivalent with Item(id) method of the Items object (not to be confused with item method that gets the item by its position)
Parameters:
Name Type Description
id any The item parameter could be any of the following:
  • item {number}, indicates a numeric value that defines the index of the item to request
  • item {string}, specifies a string expression that defines the identifier/key of the item to request
  • item {Item}, specifies the object reference to the item to request for
Returns:
Returns null or an object of Item type
Type
Item
Item

Refresh()

The Refresh() method refreshes the control
Refresh

SetAllowActions(value)

The SetAllowActions() method customizes the actions the user can perform once the control is clicked or touched
Parameters:
Name Type Description
value string Indicates the actions the user can perform once the control is clicked or touched. The format of allowActions field is:
"action(shortcut,shortcut,...),action(shortcut,shortcut,...)..."
where
  • "action", indicates the name of the action. The "action" can have any of the following values:
    • "scroll", scrolls the control by drag and drop
  • "shortcut", defines the event's button or/and the modifier-keys that are required to perform the action. The "shortcut" is a combination of none, one or more of the following values:
    • "Shift", indicates that the SHIFT key is pressed
    • "Ctrl" or "Control", indicates that the CTRL key is pressed
    • "Alt" or "Menu", indicates that the ALT key is pressed
    • "Meta" , indicates that the META key is pressed
    • "LButton", specifies that the mouse's left-button is pressed
    • "RButton", specifies that the mouse's right-button is pressed
    • "MButton", specifies that the mouse's middle/wheel-button is pressed
    • "Long", specifies that the action requires a "long" click or touch before it begins
    • "Double", specifies that the action requires a "double" click before it begins (this flag is available for non-dragable actions only such as "edit")
    • "+", indicates AND between values
Example
null {null}, indicates the control's default allowActions value
 "" {string}, specifies that no operation is allowed once the user clicks or touches the control
 "scroll" {string}, specifies that only "scroll" operation is allowed, no matter of the event's button or modifier-keys is pressed.
SetAllowActions

SetAllowFilterInput(value)

The SetAllowFilterInput() method specifies whether the control displays a filter bar, enabling the user to filter items by typing text. The ShowFilterInput programmatically displays the filter input field of the control.
Parameters:
Name Type Description
value Rollist.AllowFilterInputEnum Specifies how the filter input is displayed, as one of the following:
  • exHide (0), no filter input is visible
  • exAlwaysVisible (1), the filter input is always visible, without a close button
  • exShowOnAnyKey (2), displays the filter input when the user presses any key, including a close button. Requires the host HTML element to have a tabindex attribute for keyboard focus
  • exDisableHighlightOccurences (0x10), disables the highlighting of all occurrences of the typed text within the items, which otherwise helps users visually identify matching content.
Example
null {null} or "hide" {string} or exontrol.Rollist.AllowFilterInputEnum.exHide {AllowFilterInputEnum} or 0 {number}, no filter input is visible (by default)
 "always" {string} or exontrol.Rollist.AllowFilterInputEnum.exAlwaysVisible {AllowFilterInputEnum} or 1 {number}, indicates that the filter input is always visible
 "key,disable" {string} or (exontrol.Rollist.AllowFilterInputEnum.exShowOnAnyKey | exontrol.Rollist.AllowFilterInputEnum.exDisableHighlightOccurences) {AllowFilterInputEnum} or 0x12 {number}, shows the filter input when the user presses any key and disables the highlighting of all occurrences of the typed text in the items
SetAllowFilterInput

SetCyclic(value)

The SetCyclic() method indicates whether the items are displayed in a continuous loop.
Parameters:
Name Type Description
value boolean Indicates whether the items are displayed in a continuous loop.
SetCyclic

SetData(value)

Imports data from CSV files. The SetData(value) method is equivalent with Import(value) method. The ImportOptions type defines default options to import data.
Parameters:
Name Type Description
value any Indicates the source of the data, as one of the following:
  • A String expression that specifies the URL to a CSV file (contains no eof, eor or str)
  • A String expression in CSV format
  • An object that includes the "files" member of FileList type (a local file)
  • An array of data to load
Example
"data.txt" {string}, imports data from data.txt file
SetData

SetFilter(value)

The SetFilter() method specifies the filter to be applied to the items, ensuring that only items matching the filter criteria are shown.
Parameters:
Name Type Description
value string Specifies the filter to be applied to the items.
Example
null {null} or "" {string}, clear the filter (if applied)
 "icon" {string}, filters the items to display only those that contain the word 'icon'
    
SetFilter

SetMisc(value)

The SetMisc() method defines the control's miscellaneous options
Parameters:
Name Type Description
value MiscellaneousOptions A value that indicates the control's miscellaneous options.
SetMisc

SetOptions(nOptions, bIncludeAllopt) → {boolean}

The SetOptions() method applies new options to the view.
Parameters:
Name Type Attributes Description
nOptions object Specifies an object of Rollist.Options type that indicates the new options to apply
bIncludeAll boolean <optional>
Indicates whether all fields of nOptions are included in the item's oOptions object
Returns:
Returns true, if there were options applied to the item
Type
boolean
Example
oRollist.Options = {imageAlign: 1, imageSize: 24}, changes the alignment and the size for all images within the control.

The oRollist.Options = value statement is equivalent with oRollist.SetOptions(value) or oRollist.SetOptions(value)
SetOptions

SetSelect(value)

The SetSelect() method sets the item that is currently selected, which is always displayed at the center of the control
Parameters:
Name Type Description
value any Indicates one of the following:
  • {number}, specifies the position of the item to select
  • {string}, specifies the identifier/key of the item to select
  • {Item}, indicates the item to select
SetSelect

SetSmooth(value)

The SetSmooth() method changes the time in ms the control goes from one layout to another (0 indicates no smooth-transition is performed).
Parameters:
Name Type Description
value number Indicates the time in ms the control goes from one layout to another.
Example
0 {number}, no smooth changes once the control goes from a layout to another
  125 {number}, specifies that a smooth-transition is performed from a layout to another for 125 ms.
SetSmooth

SetWheelChange(value)

The SetWheelChange() method changes the amount the control scrolls when the user rolls the mouse wheel.
Parameters:
Name Type Description
value number A value that specifies the amount the control scrolls when the user rolls the mouse wheel.
Example
0 {number}, locks any action the mouse's wheel performs
  18 {number}, scrolls the control by 18-pixels when mouse's wheel is rotated (CTRL + wheel scrolls horizontally)
SetWheelChange

ShowFilterInput()

The ShowFilterInput() method displays the filter input field, enabling the user to type keywords for filtering items. This allows the user to narrow down the list by matching the typed words with the items displayed.
ShowFilterInput

Update(callback, thisArgopt)

The Update() method locks the control's paint during the callback, and invalidates the control once the method ends.
Parameters:
Name Type Attributes Description
callback callback Indicates a callback to perform changes within the control
thisArg any <optional>
Specifies the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Rollist type
Update

feI(callback, thisArgopt)

The feI/forEachItem() method invokes the callback for each item of the control
Parameters:
Name Type Attributes Description
callback callback A function of callback(oItem) type that's called for every item, where oItem is:
  • oItem {Item}, specifies an item of Item type
thisArg any <optional>
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Rollist type.
feI

feIU(callback, thisArgopt) → {any}

The feIU/forEachItemUnit() method invokes the callback for each item of the control, until the callback returns a not-empty value
Parameters:
Name Type Attributes Description
callback callback A function of callback(oItem) {any} type that's called for every item, where oItem is
  • oItem {Item}, specifies an item of Item type
thisArg any <optional>
Indicates the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Rollist type.
Returns:
Returns the last-value of the callback
Type
any
feIU

getInnerHTML(oItem,) → {string}

The getInnerHTML() method retrieves the inner HTML content of the HTML element associated with the specified item. You can override this function to gain more control over which HTML elements are displayed based on the item's content or value.
Parameters:
Name Type Description
oItem, Item Indicates the item whose associated inner HTML is being requested.
Returns:
Returns the inner HTML of the HTML element associated with the given item.
Type
string
getInnerHTML

item(position) → {Item}

The item() method retrieves an item based on its position within the Items collection (not to be confused with Item method that gets the item by its index or identifier/key)
Parameters:
Name Type Description
position number The zero-based index of the item to retrieve.
Returns:
The item at the specified position, or undefined if the position is invalid.
Type
Item
item

off(event, listener, methodopt)

The off() method removes an event handler that was previously bound to an event, effectively stopping the listener from responding to that event.
Parameters:
Name Type Attributes Description
event string Specifies the name of the event to unbind. The event name is case-insensitive and may or may not include the 'on' prefix. For example, 'load' is equivalent to 'onload' and vice versa.
listener object | callback Defines the listener to remove, which can either be: listener {object}, an object that implements a notification method (e.g., listener[method](oEvent) or listener[type](oEvent)) that was previously used to handle the event listener {callback}, a JavaScript callback function that was previously bound to the event (the method parameter has no effect)
method string <optional>
Defines an optional case-sensitive string specifying the method on the listener to remove. If not provided, the listener[type]() function is used. This parameter is ignored when the listener is a JavaScript callback function.
Since:
  • 4.4
Example
The following example removes the load event handler from the control:

oRollist.off("load");

where oRollist is an object of Rollist type.

This sample is equivalent to:

oRollist.Listeners.Remove("onload");

The following example removes all event handlers from the control:

oRollist.off();

where oRollist is an object of Rollist type.

This sample is equivalent to:

oRollist.Listeners.Clear();

or

oRollist.Listeners.Remove();
off

on(event, listener, methodopt) → {object}

The on() method binds a handler to a specified event, enabling you to listen for specific events and define corresponding actions.
Parameters:
Name Type Attributes Description
event string Specifies the name of the event to listen for. The event name is case-insensitive and may or may not include the 'on' prefix. For example, 'load' is equivalent to 'onload' and vice versa.
listener object | callback Defines the listener, which can either be: listener {object}, an object that implements a notification method (e.g., listener[method](oEvent) or listener[type](oEvent)) to handle the event when it occurs listener {callback}, a JavaScript callback function to handle the event directly (the method parameter has not effect)
method string <optional>
Defines an optional case-sensitive string specifying the method on the listener to handle the event. If not provided, the listener[type]() function is used. This parameter is ignored when the listener is a JavaScript callback function.
Since:
  • 4.4
Returns:
Returns the listeners of the specified type, as an exontrol.Arr({callback, thisArg, lock, name, equal}) type, which includes the following new members:
  • type {string}, specifies a case-sensitive string that specifies the type of event to listen for
  • do(event) {callback}, indicates a function that can be invoked to trigger the specified event for all listeners registered for that event type
where:
  • callback {callback}, defines the listener's callback function
  • thisArg {any}, defines the value of this during the listener's callback execution
  • lock {number}, locks or unlocks the invocation of the listener's callback
  • name {string}, defines the name of the callback, mostly used for debugging purposes
  • equal(oCompareListenerCallback) {callback}, indicates a function of callback(oCompareListenerCallback) {boolean} type compares the current object with the provided object. It returns true if the objects contain the same data
Type
object
Example
The following sample shows how you can handle the onload event:

oRollist.on("load", function()
{
  console.log("onload event occured");
});

where oRollist is an object of Rollist type.

This sample is quivalent of 

oRollist.Listeners.Add("onload", function ()
{
  console.log("onload event occured");
});
on

Events

onadditem

The onadditem() method notifies your application that a new item has been added to the control
Parameters:
Name Type Description
oItem Item Indicates an object of Item type being added
Example
The following samples display the item being added:

oRollist.onadditem = function (oItem)
{
 console.log(oItem);
}

or

oRollist.Listeners.Add("onadditem", function (oItem)
{
 console.log(oItem);
})

or

oRollist.on("additem", function (oItem)
{
 console.log(oItem);
})

where oRollist is an object of Rollist type
onadditem

onclick

The onclick() method occurs once the user clicks or double-clicks the control.
Parameters:
Name Type Description
oEvent object specifies an object of {dblClick,button,modifiers,item,html} type, that holds information about the object being clicked
Properties
Name Type Description
item Item specifies undefined or an object of Item type that indicates the clicked item
html HTMLElement specifies undefined or an object of HTMLElement type that indicates the HTML element associated with the clicked item
dblClick boolean indicates whether the user clicks or double-clicks the item
button number indicates which button is pressed while clicking the item as 1 (left), 2 (right) or 4 (middle)
modifiers number specifies a combination of 1, 2, 4 and 16 according with modifier keys (ALT, CTRL, META and SHIFT), or 0 if no modifier keys
Example
The following samples show how you can handle the "click" event:

oRollist.Listeners.Add("onclick", function (oEvent)
{
 console.log(oEvent);
})

or

oRollist.on("click", function (oEvent)
{
 console.log(oEvent);
})

or

oRollist.onclick = function (oEvent)
{
 console.log(oEvent);
}

where oRollist is an object of Rollist type.
onclick

oncreate

The oncreate() method occurs once an HTML element is created and linked to a visible item. You can use this event to associate or set additional properties or options for the newly created element.
Parameters:
Name Type Description
oEvent oEvent Defines the HTML element being constructed for a visible item, represented as an object with properties: {item,html}, where item is of type Item and html is of type HTMLElement
Properties
Name Type Description
item Item Specifies the item for which the HTML element is generated
html HTMLElement Indicates the HTML element associated with the item
Example
The following samples sets the HTML element's tooltip:

oRollist.oncreate = function (oEvent)
{
 oEvent.html.title = oEvent.html.innerText;
}

or

oRollist.Listeners.Add("oncreate", function (oEvent)
{
 oEvent.html.title = oEvent.html.innerText;
})

or

oRollist.on("create", function (oEvent)
{
 oEvent.html.title = oEvent.html.innerText;
})

where oRollist is an object of Rollist type
oncreate

ondestroy

The ondestroy() method occurs when the associated HTML element is removed from the DOM.
Parameters:
Name Type Description
oEvent oEvent Defines the {item,html} object representing the HTML element to be removed, which was created for a visible item
Properties
Name Type Description
item Item Specifies the item for which the HTML element is generated
html HTMLElement Specifies the HTML element associated with the item that is to be removed
Example
The following samples displays the element being destroyed:

oRollist.ondestroy = function (oEvent)
{
 console.log(oEvent);
}

or

oRollist.Listeners.Add("ondestroy", function (oEvent)
{
 console.log(oEvent);
})

or

oRollist.on("destroy", function (oEvent)
{
 console.log(oEvent);
})

where oRollist is an object of Rollist type
ondestroy

onerror

The onerror() method occurs once the control encountered an error.
Parameters:
Name Type Description
oEvent object Specifies an object of DOMException (or any other) type that holds information about the error
Example
The following samples display the error once it occurs:

oRollist.onerror = function (oEvent)
{
 console.log(oEvent);
}

or

oRollist.Listeners.Add("onerror", function (oEvent)
{
 console.log(oEvent);
})

or

oRollist.on("error", function (oEvent)
{
 console.log(oEvent);
})

where oRollist is an object of Rollist type
onerror

onfilter

The onfilter() method notifies your application when the user applies or clears filters, such as by typing into the control’s filter input
Parameters:
Name Type Description
filter string Indicates the destroyed HTML element
Example
The following samples displays the current filter once the user changes it:

oRollist.Listeners.Add("onfilter", function (oEvent)
{
 console.log(oEvent);
})

or

oRollist.on("filter", function (oEvent)
{
 console.log(oEvent);
})

or

oRollist.onfilter = function (oEvent)
{
 console.log(oEvent);
}

where oRollist is an object of Rollist type.
onfilter

onload

The onload() method occurs once the control loads or imports data
Example
The following samples display a message once the control loads or imports new data (for instance, the user drags and drops a file into the control):

oRollist.onload = function ()
{
 alert("onload");
}

or

oRollist.Listeners.Add("onload", function ()
{
 alert("onload");
})

or

oRollist.on("load", function ()
{
 alert("onload");
})

where oRollist is an object of Rollist type
onload

onremoveitem

The onremoveitem() method occurs once an item has been removed from the Items collection
Parameters:
Name Type Description
oItem Item Indicates an object of Item type being removed
Example
The following samples display the item being removed:

oRollist.onremoveitem = function (oItem)
{
 console.log(oItem);
}

or

oRollist.Listeners.Add("onremoveitem", function (oItem)
{
 console.log(oItem);
})

or

oRollist.on("removeitem", function (oItem)
{
 console.log(oItem);
})

where oRollist is an object of Rollist type
onremoveitem

onselect

The onselect() method notifies your application once the user selects an item at runtime (clicks an item)
Parameters:
Name Type Description
oEvent object Indicates the item being selected as an object of Item type
Example
The following samples show how you can handle the "select" event:

oRollist.Listeners.Add("onselect", function (oEvent)
{
 console.log(oEvent);
})

or

oRollist.on("select", function (oEvent)
{
 console.log(oEvent);
})

or

oRollist.onselect = function (oEvent)
{
 console.log(oEvent);
}

where oRollist is an object of Rollist type.
onselect