this do the work.
//override this method of the DataTable class
@Override
protected Item<T> newRowItem(String id, int index, final IModel<T> model) {
Item<T> rowItem = new Item<T>(id, index, model);
rowItem.add(new AjaxEventBehavior("onclick") {
private static final long serialVersionUID = 6720512493017210281L;
@Override
protected void onEvent(AjaxRequestTarget target) {
//callback or do some stuff
}
});
return rowItem;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…