It seams that this code is copied from our DeleteView.