[]
CheckBoxListCellType or RadioButtonListCellType. A SelectFieldItem stores the display text shown to the user and the underlying value associated with that option.
SelectFieldItem item = new SelectFieldItem("Option 1", "1");
CheckBoxListCellType cellType = new CheckBoxListCellType();
cellType.getItems().add(item);
SelectFieldItem(String text,
Object value) This constructor creates an empty item. Set the item's text and value after construction by using setText(String) and setValue(Object).
SelectFieldItem item = new SelectFieldItem();
item.setText("Option 1");
item.setValue("1");
CheckBoxListCellType cellType = new CheckBoxListCellType();
cellType.getItems().add(item);
This constructor initializes the display text shown to the user and the underlying value associated with the item.
SelectFieldItem item = new SelectFieldItem("Option 1", "1");
CheckBoxListCellType cellType = new CheckBoxListCellType();
cellType.getItems().add(item);
text - The display text of the item. Can be null.value - The value associated with the item. Can be null.Returns the display text used for this check box list or radio button list item.
SelectFieldItem item = new SelectFieldItem("Option 1", "1");
String text = item.getText();
null if no text has been assigned.Sets the display text used for this check box list or radio button list item.
SelectFieldItem item = new SelectFieldItem("Option 1", "1");
item.setText("Sample");
text - The text of the item. Sets null if no text has been assigned.This value identifies the selected item in a check box list or radio button list. The returned object is the value previously assigned by setValue(Object) or the SelectFieldItem(String,Object) constructor.
SelectFieldItem item = new SelectFieldItem("Option 1", "1");
Object value = item.getValue();
null if no value has been assigned.
SelectFieldItem item = new SelectFieldItem("Option 1", "1");
item.setValue(100);
value - The value of the item, or null if no value has been assigned.