T
- public class PropertyPopulator<T> extends Object implements ICellPopulator<T>
ICellPopulator
that adds a label that will display the
value of the specified property. Non-string properties will be converted to a string before
display.
Example
ICellPopulator cityPopulator = new PropertyPopulator("address.city");
Constructor and Description |
---|
PropertyPopulator(String property)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
detach()
Detaches model after use.
|
void |
populateItem(Item<ICellPopulator<T>> cellItem,
String componentId,
IModel<T> rowModel)
Method used to populate a cell in the
DataGridView
Implementation MUST add a component to the cellItem using the component id provided by
componentId argument, otherwise a WicketRuntimeException will be thrown |
public PropertyPopulator(String property)
property
- property whose value will be displayed in the cell. uses wicket's
PropertyModel
notation.public void detach()
IDetachable
detach
in interface IDetachable
IDetachable.detach()
public void populateItem(Item<ICellPopulator<T>> cellItem, String componentId, IModel<T> rowModel)
ICellPopulator
DataGridView
Implementation MUST add a component to the cellItem using the component id provided by
componentId argument, otherwise a WicketRuntimeException will be thrownpopulateItem
in interface ICellPopulator<T>
cellItem
- 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(org.apache.wicket.markup.repeater.Item,
java.lang.String, org.apache.wicket.model.IModel)
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.