Interface FieldList

All Known Subinterfaces:
CustomList, DynamicList, StaticList

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:
  • display value: the value shown to the user (usually) in a dropdown list
  • return value: the value returned when the user makes a selection from the list; the field associated with the list is set with this value
Since:
V4.4
  • Method Summary

    Modifier and Type Method 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.
  • Method Details

    • getDisplayValues

      java.lang.String[] getDisplayValues​(boolean formatted)
      Returns an array of display values for the list, 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).

      The corresponding return value can be obtained with method getReturnValue(String).

      Parameters:
      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.
      Returns:
      array of display values
      Since:
      V4.4
    • getReturnValue

      java.lang.String getReturnValue​(java.lang.String displayValue)
      Returns the return value from the list that corresponds to the display value represented by 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).

      Parameters:
      displayValue - list entry display value
      Returns:
      list entry return value
      Since:
      V4.4
    • getDisplayValue

      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.

      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).

      Parameters:
      returnValue - list entry return value
      formatted - - 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.
      Returns:
      list entry display value
      Since:
      V4.4
    • getItems

      ListItemIterator getItems()
      Returns an iterator that can be used to traverse all list items

      Further documentation.

      Javascript example:

       var items = controls.listControl.list.items;
       while (items.next())
       {
         var val = items.listValue;
         if (val == "danger")
         { 
              controls.listItem1.backgroundColor = "red";
         }
       }
       
      Returns:
      an iterator that can be used to traverse all list items
      Since:
      V5.3