2.17.2: 2011-06-17

net.sf.basedb.clients.web.taglib.table
Class TableColumn

java.lang.Object
  extended by net.sf.basedb.clients.web.taglib.table.TableColumn

public class TableColumn
extends Object

Column properties class used to define table columns.
Example use in a jsp page:

<%List<TableColumn> cols = new LinkedList<TableColumn>();
cols.add( new TableColumn("position", "POSITION", "int", "Position") );
cols.add( new TableColumn("ch1", "%1", "float", "Ch 1") );
cols.add( new TableColumn("ch2", "%2", "float", "Ch 2") );
cols.add( new TableColumn("externalId", "@externalId", "string", "External Id") );

for(TableColumn c : cols)
{%>
        <tbl:columndef 
                id="<%=c.getId()%>"
                property="<%=c.getProperty()%>"
                datatype="<%=c.getDatatype()%>"
                title="<%=c.getTitle()%>"
                sortable="<%=c.getSortable()%>" 
                filterable="<%=c.getFilterable()%>"
                exportable="<%=c.getExportable()%>"
                show="<%=c.getShow()%>" 
                formatter="<%=c.getFormatter()%>"
        />

<%}%>
   

Version:
2.0
Author:
gregory, nicklas
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Field Summary
private  Formula.AverageMethod averageMethod
           
private  Type datatype
           
private  String description
           
private  boolean exportable
           
private  boolean filterable
           
private  Formatter<?> formatter
           
private  String id
           
private  String jepExpression
           
private  String property
           
private  String show
           
private  boolean sortable
           
private  String title
           
 
Constructor Summary
TableColumn(String id, String property, String jepExpression, Type datatype, String title, String description)
          Deprecated.  
TableColumn(String id, String property, String jepExpression, Type datatype, String title, String description, String show, boolean sortable, boolean filterable, boolean exportable, Formula.AverageMethod averageMethod, Formatter<?> formatter)
           
 
Method Summary
 Formula.AverageMethod getAverageMethod()
           
 Type getDatatype()
           
 String getDescription()
           
 boolean getExportable()
           
 boolean getFilterable()
           
 Formatter<?> getFormatter()
           
 String getId()
           
 String getJepExpression()
           
 String getProperty()
           
 String getShow()
           
 boolean getSortable()
           
 String getTitle()
           
 boolean isAveragable()
           
 void setFormatter(Formatter<?> formatter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private final String id

property

private final String property

jepExpression

private final String jepExpression

datatype

private final Type datatype

title

private final String title

description

private final String description

sortable

private final boolean sortable

filterable

private final boolean filterable

exportable

private final boolean exportable

show

private final String show

averageMethod

private final Formula.AverageMethod averageMethod

formatter

private Formatter<?> formatter
Constructor Detail

TableColumn

public TableColumn(String id,
                   String property,
                   String jepExpression,
                   Type datatype,
                   String title,
                   String description)
Deprecated. 

Create TableColumn.

Parameters:
id -
property -
jepExpression -
datatype -
title -
description -

TableColumn

public TableColumn(String id,
                   String property,
                   String jepExpression,
                   Type datatype,
                   String title,
                   String description,
                   String show,
                   boolean sortable,
                   boolean filterable,
                   boolean exportable,
                   Formula.AverageMethod averageMethod,
                   Formatter<?> formatter)
Method Detail

getDatatype

public Type getDatatype()

getExportable

public boolean getExportable()

getFilterable

public boolean getFilterable()

getId

public String getId()

getProperty

public String getProperty()

getJepExpression

public String getJepExpression()

getShow

public String getShow()

getSortable

public boolean getSortable()

getTitle

public String getTitle()

getDescription

public String getDescription()

isAveragable

public boolean isAveragable()

getAverageMethod

public Formula.AverageMethod getAverageMethod()
Returns:
This table column's Formula.AverageMethod enum.
Since:
2.4

getFormatter

public Formatter<?> getFormatter()
Returns:
This column's Formatter object
Since:
2.0.2

setFormatter

public void setFormatter(Formatter<?> formatter)
Parameters:
formatter - Formatter to be set.
Since:
2.0.2

2.17.2: 2011-06-17