Good morning,
i'm current learning Spring MVC (
java annotation), hibernate, thymeleaf, Spring webflow2 making a big application for a sales network managment for the company where i'm working.
I had many problems in the past months, but i always found a solution; but this time i really can't get out of this trouble and, also on Stackoverflow, i can't get help.
The absurde thing is that i'm stuck in a very common step in web development:
a simple form with checkboxes!!!
I have a Many-to-many relationship, realized following this tutorial
hibernate-many-to-many-example-join-table-extra-column-annotation
I have one many-to-many relationship between Contest and Services. In the middle i have 2 classes: ContestServiceId, and ContestService.
Contest class:
Service class:
ContestSercvice class:
ContestServiceId class:
I'm trying to make a webflow where, in one step, i can select (checboxes) which Services are involved in the Contest; but when i try to load that page i get this error:
org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type java.lang.String to type @javax.persistence.OneToMany java.util.Set
How can i make this converter?
I already did one converter for each single entity (eg. StringToContestConverter, useful, for example, for select).
I tried to do an empty converter (with no code inside because i don't know what i have to do with ids)
and i set a breakpoint... it never stop there...
Here the code used in my view that generate the error:
services_list is binded in the flow with:
Another try i did it was this:
but when i submit the form, i get validator error:
typeMismatch on contestServices
I tryed use Set, List, TreeSet, LinkedHashSet but nothing... If i have to change how to implement ManyToMany relationship may not be a problem... but i really need have this page where check which services are involved in contest...
It's not possible that i'm the first tryingo to do this...
thank you for any tips or suggestion.