[]
DropDownItem, ListBoxItemIDropDown and IListBox. A SelectorItem stores the text value associated with an item and provides shared behavior for selector-based controls, including read-only state management. This abstract class is not used directly; instead, work with a concrete subclass and add instances to the item collection of the owning control.
When an item is marked as read-only, calling setValue(String) throws an IllegalStateException. Use getValue() to read the current item content and setReadOnly(boolean) to control whether the item can be modified.
final StringgetValue()final booleanfinal voidsetReadOnly(boolean value) final voidfinal voidUpdateBindingValue(String value) Returns the string currently stored in the selector item. This value represents the item content used by selector-based controls such as IDropDown and IListBox.
DropDownItem item = new DropDownItem("Pending");
String value = item.getValue();
null if no value has been assigned.Sets the string currently stored in the selector item. This value represents the item content used by selector-based controls such as IDropDown and IListBox.
DropDownItem item = new DropDownItem("Pending");
item.setValue("Sample");
value - The current item content, or null if no value has been assigned.This method assigns the specified value directly to the item's stored value. Unlike setValue(String), it does not check the read-only state and does not raise the value-changed event.
DropDownItem item = new DropDownItem("Pending");
item.UpdateBindingValue("Approved");
value - The binding value to assign to the item. Can be null.When this property returns true, attempts to change the item content through setValue(String) throw an IllegalStateException.
DropDownItem item = new DropDownItem("Pending");
item.setReadOnly(true);
boolean readOnly = item.isReadOnly();
true if this item is read-only; otherwise, false.When this property is set to true, the item cannot be modified through setValue(String). Set it to false to allow the item value to be edited.
DropDownItem item = new DropDownItem("Pending");
item.setReadOnly(true);
value - true to make the item read-only; false to make it editable.