public void onIconClick(IconClickEvent iconClickEvent) { FormItemIcon icon = iconClickEvent.getIcon(); if (GeocoderLayout.showClearIcon && clearIcon.getSrc().equals(icon.getSrc())) { presenter.clearLocation(); } else { presenter.goToLocation((String) textItem.getValue()); } } });