T - The Model object typeS - the type of the sort propertypublic class PropertyColumn<T,S> extends AbstractColumn<T,S> implements IExportableColumn<T,S>
PropertyModel) that is evaluated
against the current row's model object
Example
columns[0] = new PropertyColumn(new Model<String>("First Name"), "name.first");
The above will attach a label to the cell with a property model for the expression
"name.first"PropertyModel,
Serialized Form| Constructor and Description |
|---|
PropertyColumn(IModel<String> displayModel,
S sortProperty,
String propertyExpression)
Creates a property column that is also sortable
|
PropertyColumn(IModel<String> displayModel,
String propertyExpression)
Creates a non sortable property column
|
| Modifier and Type | Method and Description |
|---|---|
IModel<?> |
getDataModel(IModel<T> rowModel)
Factory method for generating a model that will generated the displayed value.
|
String |
getPropertyExpression() |
void |
populateItem(Item<ICellPopulator<T>> item,
String componentId,
IModel<T> rowModel)
Implementation of populateItem which adds a label to the cell whose model is the provided
property expression evaluated against rowModelObject
|
detach, getCssClass, getDisplayModel, getHeader, getSortProperty, isSortableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDisplayModelgetHeader, getSortProperty, isSortabledetachpublic PropertyColumn(IModel<String> displayModel, S sortProperty, String propertyExpression)
displayModel - display modelsortProperty - sort propertypropertyExpression - wicket property expression used by PropertyModelpublic PropertyColumn(IModel<String> displayModel, String propertyExpression)
displayModel - display modelpropertyExpression - wicket property expressionPropertyModelpublic void populateItem(Item<ICellPopulator<T>> item, String componentId, IModel<T> rowModel)
populateItem in interface ICellPopulator<T>item - the item representing the current table cell being renderedcomponentId - the id of the component used to render the cell (only one component should be
added to the cell)rowModel - the model of the row item being rendered. this model usually contains the model
provided by the data provider.ICellPopulator.populateItem(Item, String, IModel)public String getPropertyExpression()
public IModel<?> getDataModel(IModel<T> rowModel)
propertyExpression specified in the constructor.getDataModel in interface IExportableColumn<T,S>rowModel - Copyright © 2006–2015 Apache Software Foundation. All rights reserved.