Could you add a comment to say that it's called when the user validates the dialog.