add the controller's function of showedit