|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Represents an object that is capable of populating an Item container
representing a cell in a DataGridView with components.
Example
class NamePopulator implements ICellPopulator
{
void populateItem(final Item cellItem, final String componentId, final IModel rowModel) {
User user=(User)rowModel.getObject(cellItem);
String name=user.getFirstName()+" "+user.getLastName();
cellItem.add(new Label(componentId, name);
}}
In this example the IDataProvider assigned to the DataGridView retrieves User
objects from the database. The cell populator adds a label to the cell that
will display the full name of the user.
DataGridView,
Item| Method Summary | |
void |
populateItem(Item cellItem,
java.lang.String componentId,
wicket.model.IModel 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 |
| Method Detail |
public void populateItem(Item cellItem,
java.lang.String componentId,
wicket.model.IModel rowModel)
DataGridView
Implementation MUST add a component to the cellItem using the
component id provided by componentId argument, otherwise a
WicketRuntimeException will be thrown
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.Item
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||