public void select(String text){
  if (selectedIndex >= 0) {
    InputElement inputElement=getListItemElement(selectedIndex);
    inputElement.setChecked(false);
  }
  if (text != null) {
    for (int i=0; i < getItemCount(); i++) {
      if (text.equals(getItemText(i))) {
        setSelectedIndex(i);
        return;
      }
    }
  }
  selectedIndex=-1;
  currentItemLabel.setInnerText("");
}

public void select ( String text ) { if ( selectedIndex >= 0 ) { InputElement inputElement = getListItemElement ( selectedIndex ) ; inputElement . setChecked ( false ) ; } if ( text != null ) { for ( int i = 0 ; i < getItemCount ( ) ; i ++ ) { if ( text . equals ( getItemText ( i ) ) ) { setSelectedIndex ( i ) ; return ; } } } selectedIndex = - 1 ; currentItemLabel . setInnerText ( "" ) ; }
selects an item with given text .
