put event handler code into UI.getCurrent().access wrapper