Hi everyone.
I’ve create detail in my grid with a component renderer thanks to the doc https://vaadin.com/docs/latest/components/grid
Instead of a form like in the example I’ve created an other grid in this detail.
I would like to retrieve the object created to handle this in my principal grid.
How can I get the object ? Thanks in advance for your help.
MyPrincipalGrid is a list of “PersonDetail”.
And in that grid I have an item who contain a grid “GridPersonDetail”.
But we can choose the example for my problem in the doc https://vaadin.com/docs/latest/components/grid in the “item Details” part.
How I can I store in a variable the “PersonDetailsFormLayout” ?
You may want to look into the constructor ComponentRenderer(SerializableFunction<SOURCE, COMPONENT> componentFunction)
and use it like this
private static ComponentRenderer<GridPersonDetail, PersonDetail> createPersonDetailsRenderer() {
return new ComponentRenderer<>(personDetail -> {
var layout = new GridPersonDetail();
layout.setPersonDetail(personDetail);
// TODO store layout
return layout;
});
}