Data are now saved when user click on Ok button and discarded on Cancel.