@SuppressWarnings("unchecked") protected void componentValueChanged(HasValue.ValueChangeEvent event) { // value could be List / Set / something else if (event.getValue() instanceof Entity || event.getValue() == null) { EntityOptions entityOptionsSource = (EntityOptions) this.source; entityOptionsSource.setSelectedItem((Entity) event.getValue()); } }