Automatic form generation BeanFieldGroup ?

Hello

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: https://vaadin.com/book/-/page/jpacontainer.fieldfactory.html
but I could not do this works

[code]
@Entity
public class Cellphone(){

@Id @GeneratedValue;
private Long id;

private String number;

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

}

@Entity
public class Calls(){

@Id @GeneratedValue
private Long id;

@Temporal
private Date date;
private Integer time;

@ManyToOne
private Cellphone cellphone;

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

Hi,

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.

cheers,
matti