How do you create a link inside a PropertyColumn in Wicket?
1 answer
You can use AbstractColumn
instead PropertyColumn
. This will allow you to add any component you like, not just the string PropertyModel value.
columns.add(new AbstractColumn("displayModel", "sortModel") {
void populateItem(Item cellItem, String componentId, IModel rowModel) {
cellItem.add(new LinkPanel(componentId, rowModel));
}
}
Where LinkPanel
is the component you want to add to the cell.
+7
a source to share