{
final List<IColumn<Kost1DO, String>> columns = new ArrayList<IColumn<Kost1DO, String>>();
final CellItemListener<Kost1DO> cellItemListener = new CellItemListener<Kost1DO>() {
public void populateItem(final Item<ICellPopulator<Kost1DO>> item, final String componentId, final IModel<Kost1DO> rowModel)
{
final Kost1DO kost1 = rowModel.getObject();
appendCssClasses(item, kost1.getId(), kost1.isDeleted());
}
};
columns.add(new CellItemListenerPropertyColumn<Kost1DO>(new Model<String>(getString("fibu.kost1")), getSortable("formattedNumber",
sortable), "formattedNumber", 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<Kost1DO>> item, final String componentId, final IModel<Kost1DO> rowModel)
{
final Kost1DO kost1 = rowModel.getObject();
if (isSelectMode() == false) {
item.add(new ListSelectActionPanel(componentId, rowModel, Kost1EditPage.class, kost1.getId(), returnToPage, String.valueOf(kost1
.getFormattedNumber())));
cellItemListener.populateItem(item, componentId, rowModel);
} else {
item.add(new ListSelectActionPanel(componentId, rowModel, caller, selectProperty, kost1.getId(), String.valueOf(kost1
.getFormattedNumber())));
}
cellItemListener.populateItem(item, componentId, rowModel);
addRowClick(item);
}