com.inmethod.grid.column
Class LinkColumn<M,I>

java.lang.Object
  extended by com.inmethod.grid.column.AbstractColumn<M,I>
      extended by com.inmethod.grid.column.LinkColumn<M,I>
All Implemented Interfaces:
IGridColumn<M,I>, Serializable, IClusterable, IDetachable
Direct Known Subclasses:
PageLinkColumn

public abstract class LinkColumn<M,I>
extends AbstractColumn<M,I>

Column to display links in the DataGrid Created by IntelliJ IDEA. User: Tom Burton Date: 1/3/12 Time: 2:07 PM

Author:
Tom Burton
See Also:
Serialized Form

Constructor Summary
LinkColumn(String columnId, String propertyLabel, IModel<String> headerModel)
           
LinkColumn(String columnId, String propertyLabel, IModel<String> headerModel, String sortProperty)
           
 
Method Summary
 String getPropertyLabel()
           
 IRenderable newCell(IModel rowModel)
          Creates a new IRenderable instance that is used to render to render the output of cell for given row.
 Component newCell(WebMarkupContainer parent, String componentId, IModel<I> rowModel)
          Creates a new cell component.
abstract  void onClick(IModel<I> rowModel)
           
 void setPropertyLabel(String propertyLabel)
           
 
Methods inherited from class com.inmethod.grid.column.AbstractColumn
cellClicked, detach, getCellCssClass, getColSpan, getGrid, getHeaderCssClass, getHeaderModel, getHeaderTooltipModel, getId, getInitialSize, getMaxSize, getMinSize, getSizeUnit, getSortProperty, getWrapText, isLightWeight, isReorderable, isResizable, newHeader, setGrid, setHeaderTooltipModel, setInitialSize, setMaxSize, setMinSize, setReorderable, setResizable, setSizeUnit, setWrapText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkColumn

public LinkColumn(String columnId,
                  String propertyLabel,
                  IModel<String> headerModel)

LinkColumn

public LinkColumn(String columnId,
                  String propertyLabel,
                  IModel<String> headerModel,
                  String sortProperty)
Method Detail

newCell

public IRenderable newCell(IModel rowModel)
Creates a new IRenderable instance that is used to render to render the output of cell for given row. This method is called for rows that are lightweight ( IGridColumn.isLightWeight(IModel) returns true ).

Specified by:
newCell in interface IGridColumn<M,I>
Overrides:
newCell in class AbstractColumn<M,I>
Parameters:
rowModel - model for given row
Returns:
IRenderable instance

newCell

public Component newCell(WebMarkupContainer parent,
                         String componentId,
                         IModel<I> rowModel)
Creates a new cell component. This method is called for rows that are not lightweight ( IGridColumn.isLightWeight(IModel) returns false ).

Specified by:
newCell in interface IGridColumn<M,I>
Specified by:
newCell in class AbstractColumn<M,I>
Parameters:
parent - Parent component. This is passed in only for convenience, the method implementation is not supposed to add the newly created component to the parent.
componentId - required id of newly created components
rowModel - model for given row
Returns:
new cell component

getPropertyLabel

public String getPropertyLabel()

setPropertyLabel

public void setPropertyLabel(String propertyLabel)

onClick

public abstract void onClick(IModel<I> rowModel)


Copyright © 2007-2012 inMethod s.r.o.. All Rights Reserved.