Class PropertyPopulator<T>
- java.lang.Object
-
- org.apache.wicket.extensions.markup.html.repeater.data.grid.PropertyPopulator<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Serializable,ICellPopulator<T>,org.apache.wicket.model.IDetachable,org.apache.wicket.util.io.IClusterable
public class PropertyPopulator<T> extends Object implements ICellPopulator<T>
A convenience implementation ofICellPopulatorthat 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");- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertyPopulator(String property)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddetach()voidpopulateItem(org.apache.wicket.markup.repeater.Item<ICellPopulator<T>> cellItem, String componentId, org.apache.wicket.model.IModel<T> rowModel)Method used to populate a cell in theDataGridViewImplementation MUST add a component to the cellItem using the component id provided by componentId argument, otherwise a WicketRuntimeException will be thrown
-
-
-
Constructor Detail
-
PropertyPopulator
public PropertyPopulator(String property)
Constructor- Parameters:
property- property whose value will be displayed in the cell. uses wicket'sPropertyModelnotation.
-
-
Method Detail
-
detach
public void detach()
- Specified by:
detachin interfaceorg.apache.wicket.model.IDetachable- See Also:
IDetachable.detach()
-
populateItem
public void populateItem(org.apache.wicket.markup.repeater.Item<ICellPopulator<T>> cellItem, String componentId, org.apache.wicket.model.IModel<T> rowModel)
Description copied from interface:ICellPopulatorMethod used to populate a cell in theDataGridViewImplementation MUST add a component to the cellItem using the component id provided by componentId argument, otherwise a WicketRuntimeException will be thrown- Specified by:
populateItemin interfaceICellPopulator<T>- Parameters:
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.- See Also:
ICellPopulator.populateItem(org.apache.wicket.markup.repeater.Item, java.lang.String, org.apache.wicket.model.IModel)
-
-