My way is to get the index of the movie you want to delete directly from the list.
The onAction method for that DeleteMovie could be added/modified in the MovieListController.
The problem is how to get the index:
- You could use both getSelectionMode() and getSelectedIndex() to access the index of each movie in the list.
- When you have its index, try getItems() to get all the information of movie and remove them from the list view with the index you have
That way worked for me and also help me avoid WET code of repeating the listView multiple times.
Hope this helps!