// get a new list of matches.
setMatches(event);
// Get the auto complete component from the event and assing
if (event.getComponent() instanceof SelectInputText) {
SelectInputText autoComplete = (SelectInputText) event
.getComponent();
// if no selected item then return the previously selected item.
if (autoComplete.getSelectedItem() != null) {
currentCUI = (ConceptFirstWord) autoComplete
.getSelectedItem().getValue();
}
// otherwise if there is a selected item get the value from the
// match list
else {
ConceptFirstWord tempCUI = getMatch(autoComplete.getValue()
.toString());
if (tempCUI != null) {
currentCUI = tempCUI;
}
}