One way is to modify the DataTable
like this:
add(new DefaultDataTable("wicektid", null, null, 10) {
@Override
protected Item newCellItem(String id, int index, IModel model) {
Item item = super.newCellItem(id, index, model);
item.add(AttributeModifier.replace("title", "Your Title"));
return item;
}
@Override
protected Item newRowItem(String id, int index, IModel model) {
Item item = super.newRowItem(id, index, model);
item.add(AttributeModifier.replace("title", "Your Title"));
return item;
}
});
Here you have the control if you want the tooltip on whole rows or on individual cells.
If you want to do it in certain columns you can override populateItem
in the column like this:
add(new PropertyColumn<>(){
@Override
public void populateItem(Item<ICellPopulator<T>> item, String componentId, IModel<T> rowModel) {
super.populateItem(item, componentId, rowModel);
}
});
but in html it renders as <br> and it has no effect – eatSleepCode Jan 07 '15 at 11:49