How to bind a database value to a label component ?

I know how to bind data in a database table to a grid.
I’ve done that many times.

However, this time I want to bind a single value (a number) in a database table to a label component.

The reason is this: My application computes a number (the result) and saves it in a database table (as the only value in that table). Once the final result is calculated and saved in the database, it is supposed to be displayed on the screen - as the content of the above-mentioned label component.

How can I do this binding between a database value and a label component?

Hi,

There are few solutions here:
https://github.com/vaadin/framework/issues/8540

and
https://github.com/elmot/tipsandtricksbinder/blob/master/src/main/java/org/vaadin/tipsandtricks/TipsAndTricksUI.java