private boolean onOk(EnvironmentEvent event) { if (clickHandler == null) return false; final int index = selectedIndex(); final Object item = selected(); if (index < 0 || item == null) return false; return clickHandler.onListClick(this, index, item); }
protected boolean onEnter(KeyboardEvent event) { if (isEmpty() || clickHandler == null) return false; if (selected() == null || selectedIndex() < 0) return false; return clickHandler.onListClick(this, selectedIndex(), selected()); }