1 4 package org.apache.tapestry.contrib.table.components; 5 6 import org.apache.tapestry.contrib.table.model.IAdvancedTableColumn; 7 import org.apache.tapestry.contrib.table.model.IAdvancedTableColumnSource; 8 import org.apache.tapestry.contrib.table.model.ognl.ExpressionTableColumn; 9 import org.apache.tapestry.services.ExpressionEvaluator; 10 11 public class DefaultTableColumnSource implements IAdvancedTableColumnSource 12 { 13 14 private ExpressionEvaluator _expressionEvaluator; 15 16 17 public void setExpressionEvaluator(ExpressionEvaluator expressionEvaluator) 18 { 19 _expressionEvaluator = expressionEvaluator; 20 } 21 22 public IAdvancedTableColumn generateTableColumn(String strName, String strDisplayName, 23 boolean bSortable, String strExpression) { 24 return new ExpressionTableColumn(strName, strDisplayName, strExpression, bSortable, _expressionEvaluator); 25 } 26 } 27 | Popular Tags |