Package wicket.contrib.phonebook.web
Class CheckBoxColumn<T>
- java.lang.Object
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn<T,S>
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.HeaderlessColumn<T,String>
-
- wicket.contrib.phonebook.web.CheckBoxColumn<T>
-
- All Implemented Interfaces:
Serializable,ICellPopulator<T>,IColumn<T,String>,IStyledColumn<T,String>,IDetachable,IClusterable
public abstract class CheckBoxColumn<T> extends HeaderlessColumn<T,String>
Checkbox column forDataTable- Author:
- ivaynberg
- See Also:
CheckBoxModel, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CheckBoxColumn(IModel<Collection<Serializable>> selectionModel)Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract SerializablegetModelObjectToken(IModel<T> model)Generates a token from the model object that will represent the selected state of this row.voidpopulateItem(Item<ICellPopulator<T>> cellItem, String componentId, IModel<T> rowModel)-
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.data.table.HeaderlessColumn
getHeader
-
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn
detach, getCssClass, getDisplayModel, 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
getHeaderColspan, getHeaderRowspan, isSortable
-
-
-
-
Constructor Detail
-
CheckBoxColumn
public CheckBoxColumn(IModel<Collection<Serializable>> selectionModel)
Constructor- Parameters:
selectionModel- model that represents a collection of selected tokens generated bygetModelObjectToken(IModel). Usually this collection is aSetof primary keys.
-
-
Method Detail
-
populateItem
public void populateItem(Item<ICellPopulator<T>> cellItem, String componentId, IModel<T> rowModel)
-
getModelObjectToken
protected abstract Serializable getModelObjectToken(IModel<T> model)
Generates a token from the model object that will represent the selected state of this row. The implementation should usually return a primary key of the object inside the provided model. Example:return ((User)model.getObject()).getId();- Parameters:
model- model that contains an object bound to current row of the table- Returns:
- a token which will uniquely identify the selection of this row
-
-