Don't use Window.alert(). Use DialogFactory