Class ChoiceField

  • Direct Known Subclasses:
    ComboBox, ListBox

    public abstract class ChoiceField
    extends Field

    A choice field

    • Method Detail

      • addNewItem

        public ChoiceItem addNewItem​(java.lang.String displayName)
        Creates a new choice item. The item is automatically added to the choice field's getItems().
        Parameters:
        displayName - this item's display name
        Returns:
        the newly created choice item
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        java.lang.IllegalStateException - if the form field has widgets
        java.lang.UnsupportedOperationException - the document is read-only
      • getItems

        public ChoiceItemList getItems()

        The list of choice items (Getter)

        Adding or removing items or clearing the list is not supported.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed