org.apache.wicket.extensions.markup.html.tree.table
Class PropertyRenderableColumn

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.tree.table.AbstractColumn
      extended by org.apache.wicket.extensions.markup.html.tree.table.AbstractRenderableColumn
          extended by org.apache.wicket.extensions.markup.html.tree.table.PropertyRenderableColumn
All Implemented Interfaces:
Serializable, IColumn, IClusterable
Direct Known Subclasses:
PropertyEditableColumn

public class PropertyRenderableColumn
extends AbstractRenderableColumn

Lightweight column that uses a property expression to get the value from the node.

Author:
Matej Knopp
See Also:
Serialized Form

Constructor Summary
PropertyRenderableColumn(ColumnLocation location, String header, String propertyExpression)
          Creates the columns.
 
Method Summary
 IConverter getConverter()
          Returns the converter or null if no converter is specified.
 Locale getLocale()
          Returns the locale or null if no locale is specified.
 String getNodeValue(TreeNode node)
          Returns the string value for the provided node.
protected  String getPropertyExpression()
          Returns the property expression.
 void setConverter(IConverter converter)
          By default the property is converted to string using toString method.
 void setLocale(Locale locale)
          Sets the locale to be used as parameter for custom converter (if one is specified).
 
Methods inherited from class org.apache.wicket.extensions.markup.html.tree.table.AbstractRenderableColumn
isContentAsTooltip, isEscapeContent, newCell, newCell, setContentAsTooltip, setEscapeContent
 
Methods inherited from class org.apache.wicket.extensions.markup.html.tree.table.AbstractColumn
getLocation, getSpan, getTreeTable, isVisible, newHeader, setTreeTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyRenderableColumn

public PropertyRenderableColumn(ColumnLocation location,
                                String header,
                                String propertyExpression)
Creates the columns.

Parameters:
location - Specifies how the column should be aligned and what his size should be
header - Header caption
propertyExpression - Expression for property access
Method Detail

getConverter

public IConverter getConverter()
Returns the converter or null if no converter is specified.

Returns:
The converter or null

getLocale

public Locale getLocale()
Returns the locale or null if no locale is specified.

Returns:
The locale or null

getNodeValue

public String getNodeValue(TreeNode node)
Description copied from class: AbstractRenderableColumn
Returns the string value for the provided node.

Specified by:
getNodeValue in class AbstractRenderableColumn
Parameters:
node - Determines the position in tree
Returns:
The
See Also:
AbstractRenderableColumn.getNodeValue(TreeNode)

setConverter

public void setConverter(IConverter converter)
By default the property is converted to string using toString method. If you want to alter this behavior, you can specify a custom converter.

Parameters:
converter - any converter

setLocale

public void setLocale(Locale locale)
Sets the locale to be used as parameter for custom converter (if one is specified). If no locale is set, session locale is used.

Parameters:
locale - Any locale

getPropertyExpression

protected String getPropertyExpression()
Returns the property expression.

Returns:
The property expression


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.