ListBoxControl listBoxControl = (ListBoxControl) listBox;
listBoxControl.getViewConverter().display(dropDown.getElement().findElementByName("#text"), selectedItem);
final int selectedItemIndex = getSelectedIndex(data);
if (screen.isActivePopup(popupInstance)) {
dropDown.getElement().getControl(DropDownControl.class).close(new EndNotify() {
@Override
public void perform() {
nifty.publishEvent(dropDown.getId(), new DropDownSelectionChangedEvent(dropDown, selectedItem, selectedItemIndex));
}
});