public interface ListItemIterator
extends java.io.Serializable
ListIterator
interface provides the ability to iterate through a list's values.
This can be used to set properties on any of the controls used to render the list.
Example:
var items = controls.listControl.list.items; while (items.next()) { var val = items.listValue; if (val == "danger") { controls.listItem1.backgroundColor = "red"; } }
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getListValue()
Returns the value of the current list item.
|
int |
getSize()
Returns the number of items in the list.
|
boolean |
next()
Iterates through the list's items and sets the next list item as the current item, returns false if no more items exist.
|
boolean next()
All list items referenced by an iterator can be processed within a loop within while (iter.next())
as shown in
the example below.
Javascript example:
var items = controls.listControl.list.items; while (items.next()) { var val = items.listValue; if (val == "danger") { controls.listItem1.backgroundColor = "red"; } }
int getSize()
java.lang.String getListValue()