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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
dynamic caption for buttons in a grid view
I'm Vaadin beginner.
I intend to write a dynamic menu consisting of buttons arranged in grid view.
The captions of those buttons should be set dynamically from a result set of a JPA query.
I guess, it should somehow be possible to bind a button's caption to a field of a JPA container, where the button might hold an int property referring to the offset within the resultset of the query.
Example:
ResultSet of the query is:
Person
--------
"John"
"Henry"
"Jeffrey"
"Carl"
Grid Layout (2*2) defined as:
Button0 Button1
Button2 Button3
Grid Layout should be desplayed as:
John Henry
Jeffrey Carl
Does anyone have an idea how to bind the captions of the buttons to the values in the result set of the query?
I'm very grateful for every hint!