Methods for the List Object

The following describes the methods that are available for the List object. These methods are used for color coding in lists.

Table Methods for the List Object

Method Name Return Type Description Sample Code Notes

getRow(Row#)

ListRow

Returns the specific row in the displayed list based on the Row# parameter.

listRow= listObject.getRow(0);

The first row has index 0 and the last row has index getDisplayedCount()-1.

If the Row# value is invalid, then null is returned.

getDisplayedCount()

Integer

Returns the total number of rows displayed on the screen.

x = listObject.getDisplayedCount();

None

on(event,customhandler)

this

Registers a custom handler for the list currently displayed on the screen.

Note: The framework passes the custom handler a row parameter, see About the Custom Handler for a List Object.
functionmyColorHandler(row){
//Change column YYY's color based on column XXX's value
if (row.getField("XXX").getValue()
=="High"){
row.getField("YYY").setColor(...);
}
//Special logic for first row
if (row.rowNum == 0){
row.setColor(...);
}
}
listObj.on("display",
myColorHandler);

For initial page load and paging, the handler is called for each row on the list.

For inline editing, the row object that is passed to the custom handler is based on the row on which the inline edit was processed.

The event parameter must be "display".

off(event)

this

Removes the custom handler

listObj.off("display");

If the event parameter is not "display", it is ignored and the custom handler is not removed.