/** * Perform change logic for this component. * <p>Reset focus ONLY if the current Request is an Ajax request. See https://github.com/BorderTech/wcomponents/issues/501.</p> */ protected void doHandleChanged() { // If there is an associated action, execute it if (getActionOnChange() != null) { final ActionEvent event = new ActionEvent(this, getActionCommand(), getActionObject()); final boolean isCAT = isCurrentAjaxTrigger(); Runnable later = new Runnable() { @Override public void run() { getActionOnChange().execute(event); if (isCAT && UIContextHolder.getCurrent().getFocussed() == null) { setFocussed(); } } }; invokeLater(later); } else if (AjaxHelper.isCurrentAjaxTrigger(this) && UIContextHolder.getCurrent().getFocussed() == null) { setFocussed(); } }