I had to create my own solution. It was simple a datastructure which was initialized with the items on the 'available' list as well with the items on the 'selected' list. When an item was transfered I simply checked where the item was e.g., 'selected' and then I moved it to the 'available' list.
I tried several other solutions but nothing worked. This was the easiest solution I could think of.