|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn<T>
org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn<T>
T - The Model object typepublic class PropertyColumn<T>
A convenience implementation of column that adds a label to the cell whose model is determined by
the provided wicket property expression (same as used by 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 Summary | |
|---|---|
PropertyColumn(IModel<String> displayModel,
String propertyExpression)
Creates a non sortable property column |
|
PropertyColumn(IModel<String> displayModel,
String sortProperty,
String propertyExpression)
Creates a property column that is also sortable |
|
| Method Summary | |
|---|---|
protected IModel<?> |
createLabelModel(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 |
| Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn |
|---|
detach, getCssClass, getDisplayModel, getHeader, getSortProperty, isSortable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyColumn(IModel<String> displayModel,
String sortProperty,
String propertyExpression)
displayModel - display modelsortProperty - sort propertypropertyExpression - wicket property expression used by PropertyModel
public PropertyColumn(IModel<String> displayModel,
String propertyExpression)
displayModel - display modelpropertyExpression - wicket property expressionPropertyModel| Method Detail |
|---|
public void populateItem(Item<ICellPopulator<T>> item,
String componentId,
IModel<T> rowModel)
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)protected IModel<?> createLabelModel(IModel<T> rowModel)
propertyExpression specified in the constructor.
rowModel -
public String getPropertyExpression()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||