O'Reilly logo

Vaadin 7 UI Design By Example Beginner's Guide by Alejandro Duarte

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Footers

Footers are the best place to show totals or any data related to columns. They are placed at the bottom of each table column. To show footers you have to make them visible by using the following:

table.setFooterVisible(true);

Then, you can set the footer using the setColumnFooter method:

table.setColumnFooter("Column 1", "Footer 1");

Clicking on footers

Similar to headers, you can add click listeners to the footers. The following code will show a notification every time the user clicks on the footer:

table.addFooterClickListener(new FooterClickListener() {

  public void footerClick(FooterClickEvent event) {
    Notification.show("Footer clicked: " + event.getPropertyId());
  }

});

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required