Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 3 weeks ago
AddColum with embedded object
Hello,
I'd like to insert the property(string) of an embedded object with addColumn.
My code is just :
tarifsLignesGrid.addColumn(TarifsLignes::getProducts).setCaption(TITLE_PRODUCTS)
the getProduct return a Product entity in which I'd like to take the name property instead of the toString return.
For the moment the solution I found is to create a method getProductName in the TarifsLignes entity class is there a better/cleaner solution ?
Thanks
Last updated on
Hello,
You want something like that ?
tarifsLignesGrid.addColumn(tarifLignes -> tarifLignes.getProducts.getName()).setCaption(TITLE_PRODUCTS)
Last updated on
+1
Thanks a lot, I must be too old school or just too old, I never think about this kind of writing :D
Last updated on
You cannot reply to this thread.