Class AbstractExportableColumn<T,S>
- java.lang.Object
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn<T,S>
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.export.AbstractExportableColumn<T,S>
-
- Type Parameters:
T- The type of each row in the table.S- The type of the sort property of the table.
- All Implemented Interfaces:
Serializable,ICellPopulator<T>,IExportableColumn<T,S>,IColumn<T,S>,IStyledColumn<T,S>,org.apache.wicket.model.IDetachable,org.apache.wicket.util.io.IClusterable
public abstract class AbstractExportableColumn<T,S> extends AbstractColumn<T,S> implements IExportableColumn<T,S>
A helper implementation ofIExportableColumn. This implementation requires you to only implementIExportableColumn.getDataModel(org.apache.wicket.model.IModel).- Author:
- Jesse Long
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractExportableColumn(org.apache.wicket.model.IModel<String> displayModel)Creates a newAbstractExportableColumnwith the provided display model, and without a sort property.AbstractExportableColumn(org.apache.wicket.model.IModel<String> displayModel, S sortProperty)Creates a newAbstractExportableColumnwith the provided display model, and sort property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.wicket.ComponentcreateDisplayComponent(String componentId, org.apache.wicket.model.IModel<?> dataModel)Creates aComponentwhich will be used to display the content of the column in this row.voidpopulateItem(org.apache.wicket.markup.repeater.Item<ICellPopulator<T>> cellItem, String componentId, org.apache.wicket.model.IModel<T> rowModel)Populated the data for this column in the row into thecellItem.-
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn
detach, getCssClass, getDisplayModel, getHeader, getSortProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn
getHeader, getHeaderColspan, getHeaderRowspan, getSortProperty, isSortable
-
Methods inherited from interface org.apache.wicket.extensions.markup.html.repeater.data.table.export.IExportableColumn
getDataModel, getDisplayModel
-
-
-
-
Constructor Detail
-
AbstractExportableColumn
public AbstractExportableColumn(org.apache.wicket.model.IModel<String> displayModel)
Creates a newAbstractExportableColumnwith the provided display model, and without a sort property.- Parameters:
displayModel- TheIModelof the text to be used in the column header.
-
AbstractExportableColumn
public AbstractExportableColumn(org.apache.wicket.model.IModel<String> displayModel, S sortProperty)
Creates a newAbstractExportableColumnwith the provided display model, and sort property.- Parameters:
displayModel- TheIModelof the text to be used in the column header.sortProperty- The sort property used by this column.
-
-
Method Detail
-
createDisplayComponent
protected org.apache.wicket.Component createDisplayComponent(String componentId, org.apache.wicket.model.IModel<?> dataModel)
Creates aComponentwhich 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.- Parameters:
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.- Returns:
- a
Componentwhich will be used to display the content of the column in this row.
-
populateItem
public void populateItem(org.apache.wicket.markup.repeater.Item<ICellPopulator<T>> cellItem, String componentId, org.apache.wicket.model.IModel<T> rowModel)
Populated the data for this column in the row into thecellItem.This implementation adds the
Componentreturned bycreateDisplayComponent(java.lang.String, org.apache.wicket.model.IModel)to the cell.- Specified by:
populateItemin interfaceICellPopulator<T>- Parameters:
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.- See Also:
Item
-
-