I bound several text fields to an entity in the IDE Rapidclipse that uses Vaadin 14 and JPA/Hibernate. The aim is to write the input data on button click into the referring database that is defined as datasource.
I already found this documentation
Writing manually.
So my understanding of this is like that: At first i need to create a new bean of the entity (Test test = new Test()
). Then all input data should be assigned to the attributes of the bean(binder.writeBean(test)
). That's as far as the documentation goes. But how does the data get inserted into the table of the entity in my database? Do i need the TestDAO class?
In Vaadin 7, which was used in the former Rapidclipse version, it worked like this:
fieldGroup.setItemDatasource(new Test());
...
fieldgroup.save()