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()); } });