How to insert gate components into Wicket DataTable "substrings"

I want to add captions to my DataTable (as done in How to insert "substrings" into a Wicket DataTable ), but I would like to go a step further and add my own custom gate components to the added html for the substring. Since the extra HTML in this question was added to onRender, it is always too late to add components. Is there any other way to add Markup and Wicket components as a substring of the DataTable?


source to share

1 answer

Use AbstractColumn

instead PropertyColumn

. For example:

columns.put(new AbstractColumn<TestResult>(new Model<String>("test column")) {
    public void populateItem(Item<ICellPopulator<TestResult>> cellItem, String componentId, IModel<TestResult> rowModel) {
        cellItem.add(new MyComponent(componentId));




All Articles