public interface FieldList
FieldList
is the base interface for all field list types: CustomList
, StaticList
, DynamicList
.
All lists are made up of list elements where each element contains at least:
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDisplayValue(java.lang.String returnValue,
boolean formatted)
Returns the display value from the list that corresponds to the return value represented by
returnValue ,
optionally formatted for the user's locale. |
java.lang.String[] |
getDisplayValues(boolean formatted)
Returns an array of display values for the list, optionally formatted for the user's locale.
|
ListItemIterator |
getItems()
Returns an iterator that can be used to traverse all list items
|
java.lang.String |
getReturnValue(java.lang.String displayValue)
Returns the return value from the list that corresponds to the display value represented by
displayValue . |
java.lang.String[] getDisplayValues(boolean formatted)
Each entry within a list contains a display value (the value displayed to the user) and a return value (the value returned to the server when a selection is made - this becomes the field value).
The corresponding return value can be obtained with method getReturnValue(String)
.
formatted
- - display values are formatted according to the formatting language configured for the current language.
Formatting is applicable for date, time and numeric fields. See Tools > System Preferences > Internationalization for details
of the formatting applied for each language. When false, any default formatting is applied: date fields are displayed with
default formatting as specified in parameter Ufs.dateFormat
in file UFSSetup.properties
.java.lang.String getReturnValue(java.lang.String displayValue)
displayValue
.
Each entry within a list contains a display value (the value displayed to the user) and a return value (the value returned to the server when a selection is made - this becomes the field value).
displayValue
- list entry display valuejava.lang.String getDisplayValue(java.lang.String returnValue, boolean formatted)
returnValue
,
optionally formatted for the user's locale.
Each entry within a list contains a display value (the value displayed to the user) and a return value (the value returned to the server when a selection is made - this becomes the field value).
returnValue
- list entry return valueformatted
- - the display value is formatted according to the formatting language configured for the current language.
Formatting is applicable for date, time and numeric fields. See Tools > System Preferences > Internationalization for details
of the formatting applied for each language. When false, any default formatting is applied: date fields are displayed with
default formatting as specified in parameter Ufs.dateFormat
in file UFSSetup.properties
.ListItemIterator getItems()
Javascript example:
var items = controls.listControl.list.items; while (items.next()) { var val = items.listValue; if (val == "danger") { controls.listItem1.backgroundColor = "red"; } }