{
final List<IColumn<KontoDO, String>> columns = new ArrayList<IColumn<KontoDO, String>>();
final CellItemListener<KontoDO> cellItemListener = new CellItemListener<KontoDO>() {
public void populateItem(final Item<ICellPopulator<KontoDO>> item, final String componentId, final IModel<KontoDO> rowModel)
{
final KontoDO konto = rowModel.getObject();
appendCssClasses(item, konto.getId(), konto.isDeleted());
}
};
columns.add(new CellItemListenerPropertyColumn<KontoDO>(new Model<String>(getString("fibu.konto.nummer")), getSortable("nummer",
sortable), "nummer", cellItemListener) {
/**
* @see org.projectforge.web.wicket.CellItemListenerPropertyColumn#populateItem(org.apache.wicket.markup.repeater.Item,
* java.lang.String, org.apache.wicket.model.IModel)
*/
@Override
public void populateItem(final Item<ICellPopulator<KontoDO>> item, final String componentId, final IModel<KontoDO> rowModel)
{
final KontoDO konto = rowModel.getObject();
if (isSelectMode() == false) {
item.add(new ListSelectActionPanel(componentId, rowModel, KontoEditPage.class, konto.getId(), returnToPage, String.valueOf(konto
.getNummer())));
} else {
item.add(new ListSelectActionPanel(componentId, rowModel, caller, selectProperty, konto.getId(),
String.valueOf(konto.getNummer())));
}
cellItemListener.populateItem(item, componentId, rowModel);
addRowClick(item);
}
});