Automatic form generation BeanFieldGroup ?


I have a bean with JPA annotations @ManyToMany and @OneToMany.
I want know if exist some way to create a component automatically with BeanFieldGroup to attribute List data.

I’m found this:
but I could not do this works

public class Cellphone(){

@Id @GeneratedValue;
private Long id;

private String number;

@OneToMany(mappedBy="cellphone", cascade = CascadeType.ALL)
private List<Calls> listCalls = new ArrayList<Calls>();


public class Calls(){

@Id @GeneratedValue
private Long id;

private Date date;
private Integer time;

private Cellphone cellphone;

[/code]There’s some way create “automatically” BeanFieldGroup to List ?


The field factory API in the BeanFieldGroup is not as flexible as with Form. If you want to use “autogeneration strategy” for your entity editor forms, I suggest to stay with the (deprecated) Form.

Autogenerated forms, especially with tools like JPAContaieners field factories, is a powerful concept for prototyping, but quite often if you want fine tune your forms and better UX you’ll finally want to create separate views for your entity types. In my previous projects I have mostly used the more flexible method. You can be very productive with that method as well if you use tools to automatically generate view stubs. IMO Vaadin tooling should definitely include something for this area, but until you could try e.g. these:

There might be some other tools available as well.