* @return ITableColumnModel the created column model
*/
private ITableColumnModel createColumnModel()
{
// The column value is extracted via OGNL using ExpressionTableColumn
ITableColumn objLocaleColumn = new ExpressionTableColumn("Locale", "toString()", true);
// The column value is extracted in a custom evaluator class
ITableColumn objCurrencyColumn =
new SimpleTableColumn("Currency", new CurrencyEvaluator(), true);
// The entire column is defined using a custom column class
ITableColumn objDateFormatColumn = new DateFormatColumn(new Date());
// The column value is extracted via OGNL using ExpressionTableColumn
// and the renderer of the column is defined in a Block
ExpressionTableColumn objVerbosityColumn =
new ExpressionTableColumn(
"Verbosity",
"@org.apache.tapestry.workbench.table.VerbosityRating@calculateVerbosity(#this)",
true);
Block objVerbosityBlock = (Block) getComponent("blockVerbosity");
ITableRendererSource objVerbosityRenderer = new BlockTableRendererSource(objVerbosityBlock);
objVerbosityColumn.setValueRendererSource(objVerbosityRenderer);
// The renderer of the column is defined in a Block and contains a link
SimpleTableColumn objDeleteColumn = new SimpleTableColumn("");
Block objDeleteBlock = (Block) getComponent("blockDelete");
ITableRendererSource objDeleteRenderer = new BlockTableRendererSource(objDeleteBlock);