You need to implement a custom Header and add it to the column which should contain that footer.
For example:
public class QuantityFooter extends Header<Number> {
private final Number totalQty;
public QuantityFooter(Number totalQty) {
super(new NumberCell());
this.totalQty = totalQty;
}
public void setQuantity(Number totalQty) {
this.totalQty = totalQty;
}
@Override
public Number getValue() {
return totalQty;
}
}
Then add it to the column:
QuantityFooter quantityFooter = new QuantityFooter(0);
cellTable.addColumn(qty, new TextHeader("Qty"),quantityFooter );
When you need to update the footer you just call quantityFooter.setQuantity(10)
and you probably need to redraw the headers/footers with redrawHeader()
and redrawFooters()