I have two entities (Project and Student), with many to many relathionship and a form with two lists of elements.
When I want to add new student, two list of elements appear. One list (left) have all available projects and other list (right) will have the project selected by the student.
The problem come when I try to bind the right list. I have other examples but with simple elements like this:
There are several different approaches that might work here. I wouldn’t probably use Binder at all in a scenario like that (typically Binder binds one Field to one Property), but it could be made work with a suitable Converter. Have you already watched this training: https://vaadin.com/training/course/view/v10-forms ?
it depends what your UI component there is. If you have something like a TextField, you can react to its value changes in a ValueChangeListener. This should also have a mention in the training.
You could display the items in two Grids, for example. Then add two buttons for moving items between the two Grids. On button click, you can then put the selected item inside your object instance or remove it from there.