temp
By the setSelectionBehavior function , make sure the user select one
item once in the view
fix the bugs caused by index and another bug if the user edit the data
but do not change the data
fix the insert bug