private void updateTextInput(){
  String newValue=list.getSelectedValue();
  if (newValue != null && !newValue.isEmpty()) {
    input.setText(newValue);
    valueChanged(newValue);
  }
}

private void updateTextInput ( ) { String newValue = list . getSelectedValue ( ) ; if ( newValue != null && ! newValue . isEmpty ( ) ) { input . setText ( newValue ) ; valueChanged ( newValue ) ; } }
sets the text of the input field based on the current selected value of the list .
