public abstract class LinkColumn<M,I,S> extends AbstractColumn<M,I,S>
DataGrid
Constructor and Description |
---|
LinkColumn(String columnId,
String propertyLabel,
org.apache.wicket.model.IModel<String> headerModel)
Create a new Link Column
|
LinkColumn(String columnId,
String propertyLabel,
org.apache.wicket.model.IModel<String> headerModel,
S sortProperty)
Create a new Link Column
|
Modifier and Type | Method and Description |
---|---|
String |
getPropertyLabel() |
IRenderable<I> |
newCell(org.apache.wicket.model.IModel<I> rowModel)
Creates a new
IRenderable instance that is used to render to render the output of
cell for given row. |
org.apache.wicket.Component |
newCell(org.apache.wicket.markup.html.WebMarkupContainer parent,
String componentId,
org.apache.wicket.model.IModel<I> rowModel)
Creates a new cell component.
|
abstract void |
onClick(org.apache.wicket.model.IModel<I> rowModel)
Called when a link is clicked.
|
void |
setPropertyLabel(String propertyLabel) |
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
public LinkColumn(String columnId, String propertyLabel, org.apache.wicket.model.IModel<String> headerModel)
columnId
- column id (must be unique within the grid)propertyLabel
- Label to display for the Link,
gotten from the model object itself ala PropertyModel
headerModel
- model object for the column headerpublic LinkColumn(String columnId, String propertyLabel, org.apache.wicket.model.IModel<String> headerModel, S sortProperty)
columnId
- column id (must be unique within the grid)propertyLabel
- Label to display for the Link,
gotten from the model object itself ala PropertyModel
headerModel
- model object for the column headersortProperty
- property to sort the column bypublic IRenderable<I> newCell(org.apache.wicket.model.IModel<I> rowModel)
AbstractColumn
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
).newCell
in interface IGridColumn<M,I,S>
newCell
in class AbstractColumn<M,I,S>
rowModel
- model for given rowIRenderable
instancepublic org.apache.wicket.Component newCell(org.apache.wicket.markup.html.WebMarkupContainer parent, String componentId, org.apache.wicket.model.IModel<I> rowModel)
AbstractColumn
IGridColumn.isLightWeight(IModel)
returns false ).newCell
in interface IGridColumn<M,I,S>
newCell
in class AbstractColumn<M,I,S>
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 componentsrowModel
- model for given rowpublic String getPropertyLabel()
public void setPropertyLabel(String propertyLabel)
propertyLabel
- row model object property name for the link Textpublic abstract void onClick(org.apache.wicket.model.IModel<I> rowModel)
rowModel
- Model Object for the DataGridRow being passed to the linkLink.onClick()
Copyright © 2015. All rights reserved.