Kliver Max
Kliver Max

Reputation: 5299

How to add data from database to table in Vaadin?

I have a table

  Table table = new Table();
  table.setHeight("100%");
  table.addContainerProperty("First Name", String.class, null);
  table.addContainerProperty("Last Name", String.class, null);
  table.addContainerProperty("Year", Integer.class, null);

And i want to fill this table data from data base (PostgreSQL) . Can you give me example?

Upvotes: 1

Views: 6619

Answers (1)

miq
miq

Reputation: 2766

Check out SQLContainer and JPAContainer. JPAContainer also has a pretty nice tutorial.

I'd recommend SQLContainer for smaller applications and JPAContainer for larger applications. SQLContainer is integrated in the Vaadin core from version 6.7 upwards.

Upvotes: 3

Related Questions