public void setSingleValue ( T value , boolean fireEvents ) { int index = this . values . indexOf ( value ) ; if ( index < 0 && value instanceof String ) { index = getIndexByString ( ( String ) value ) ; } if ( index > - 1 ) { List < T > before = getValue ( ) ; setSelectedIndex ( index ) ; if ( fireEvents ) { ValueChangeEvent . fireIfNotEqual ( this , before , Collections . singletonList ( value ) ) ; } } }
Set the selected value using a single item generally used in single selection mode .