final List<IColumn<GanttChartDO, String>> columns = new ArrayList<IColumn<GanttChartDO, String>>();
final CellItemListener<GanttChartDO> cellItemListener = new CellItemListener<GanttChartDO>() {
public void populateItem(final Item<ICellPopulator<GanttChartDO>> item, final String componentId, final IModel<GanttChartDO> rowModel)
{
final GanttChartDO ganttChart = rowModel.getObject();
appendCssClasses(item, ganttChart.getId(), ganttChart.isDeleted());
}
};
columns.add(new CellItemListenerPropertyColumn<GanttChartDO>(new Model<String>(getString("gantt.name")), "name", "number",
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<GanttChartDO>> item, final String componentId, final IModel<GanttChartDO> rowModel)
{
final GanttChartDO ganttChart = rowModel.getObject();
item.add(new ListSelectActionPanel(componentId, rowModel, GanttChartEditPage.class, ganttChart.getId(), GanttChartListPage.this,
ganttChart.getName()));
cellItemListener.populateItem(item, componentId, rowModel);
addRowClick(item);
}
});
columns.add(new CellItemListenerPropertyColumn<GanttChartDO>(new Model<String>(getString("created")), "created", "created",