org.apache.tapestry.contrib.table.components
Class TableUtils

java.lang.Object
  extended by org.apache.tapestry.contrib.table.components.TableUtils

public class TableUtils
extends Object

A placeholder for a static methods related to the Table component

Since:
3.0
Version:
$Id: TableUtils.java 385802 2006-03-14 13:47:10Z jkuhnert $
Author:
Mindbridge

Constructor Summary
TableUtils()
           
 
Method Summary
static String format(String key, Object arg)
          Convienience method for invoking format(String, Object[]).
static String format(String key, Object[] args)
          Gets a string from the TableStrings resource bundle.
static String format(String key, Object arg1, Object arg2)
          Convienience method for invoking format(String, Object[]).
static String format(String key, Object arg1, Object arg2, Object arg3)
          Convienience method for invoking format(String, Object[]).
static ITableColumnModel generateTableColumnModel(String strDesc, IComponent objComponent, IComponent objColumnSettingsContainer)
          Generate a table column model out of the description string provided.
static String getMessage(String key)
          Convienience method for invoking format(String, Object[]).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableUtils

public TableUtils()
Method Detail

format

public static String format(String key,
                            Object[] args)
Gets a string from the TableStrings resource bundle.


getMessage

public static String getMessage(String key)
Convienience method for invoking format(String, Object[]).


format

public static String format(String key,
                            Object arg)
Convienience method for invoking format(String, Object[]).


format

public static String format(String key,
                            Object arg1,
                            Object arg2)
Convienience method for invoking format(String, Object[]).


format

public static String format(String key,
                            Object arg1,
                            Object arg2,
                            Object arg3)
Convienience method for invoking format(String, Object[]).


generateTableColumnModel

public static ITableColumnModel generateTableColumnModel(String strDesc,
                                                         IComponent objComponent,
                                                         IComponent objColumnSettingsContainer)
Generate a table column model out of the description string provided. Entries in the description string are separated by commas. Each column entry is of the format name, name:expression, or name:displayName:expression. An entry prefixed with ! represents a non-sortable column. If the whole description string is prefixed with *, it represents columns to be included in a Form.

Parameters:
strDesc - the description of the column model to be generated
objComponent - the component ordering the generation
objColumnSettingsContainer - the component containing the column settings
Returns:
a table column model based on the provided parameters