T
- The type of each row in the table.S
- The type of the sort property of the table.public abstract class AbstractExportableColumn<T,S> extends AbstractColumn<T,S> implements IExportableColumn<T,S>
IExportableColumn
. This implementation requires you to only
implement IExportableColumn.getDataModel(org.apache.wicket.model.IModel)
.Constructor and Description |
---|
AbstractExportableColumn(IModel<String> displayModel)
Creates a new
AbstractExportableColumn with the provided display model, and without a sort property. |
AbstractExportableColumn(IModel<String> displayModel,
S sortProperty)
Creates a new
AbstractExportableColumn with the provided display model, and sort property. |
Modifier and Type | Method and Description |
---|---|
protected Component |
createDisplayComponent(String componentId,
IModel<?> dataModel)
Creates a
Component which will be used to display the content of the column in this row. |
void |
populateItem(Item<ICellPopulator<T>> cellItem,
String componentId,
IModel<T> rowModel)
Populated the data for this column in the row into the
cellItem . |
detach, getCssClass, getDisplayModel, getHeader, getHeaderColspan, getHeaderRowspan, getSortProperty, isSortable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDataModel, getDisplayModel
getHeader, getSortProperty, isSortable
detach
public AbstractExportableColumn(IModel<String> displayModel)
AbstractExportableColumn
with the provided display model, and without a sort property.displayModel
- The IModel
of the text to be used in the column header.public AbstractExportableColumn(IModel<String> displayModel, S sortProperty)
AbstractExportableColumn
with the provided display model, and sort property.displayModel
- The IModel
of the text to be used in the column header.sortProperty
- The sort property used by this column.protected Component createDisplayComponent(String componentId, IModel<?> dataModel)
Component
which will be used to display the content of the column in this row.
The default implementation simply creates a label with the data model provided.componentId
- The component id of the display component.dataModel
- The model of the data for this column in the row. This should usually be passed as the model
of the display component.Component
which will be used to display the content of the column in this row.public void populateItem(Item<ICellPopulator<T>> cellItem, String componentId, IModel<T> rowModel)
cellItem
.
This implementation adds the Component
returned by createDisplayComponent(java.lang.String, org.apache.wicket.model.IModel)
to the cell.
populateItem
in interface ICellPopulator<T>
cellItem
- The cell to be populated.componentId
- The component id to be used for the component that will be added to the cell.rowModel
- A model of the row data.Item
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.