KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > contrib > table > components > DefaultTableColumnSource


1 /*
2  * Created on Jun 4, 2005
3  */

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     /** @since 4.0 */
14     private ExpressionEvaluator _expressionEvaluator;
15
16     /** @since 4.0 */
17     public void setExpressionEvaluator(ExpressionEvaluator expressionEvaluator)
18     {
19         _expressionEvaluator = expressionEvaluator;
20     }
21     
22     public IAdvancedTableColumn generateTableColumn(String JavaDoc strName, String JavaDoc strDisplayName,
23             boolean bSortable, String JavaDoc strExpression) {
24         return new ExpressionTableColumn(strName, strDisplayName, strExpression, bSortable, _expressionEvaluator);
25     }
26 }
27
Popular Tags