I have an AjaxFallbackDefaultDataTable
which contains one row per test result. A test result may have a note attached to it, which needs to be displayed prominently below the test result, hopefully giving a table similar to the following:
| Test | Result | Appraisal |
|------|--------|-----------|
| 1 | 20.0 | PASS |
| 2 | 1.50 | FAIL |
| Note: This is an epic fail|
| 3 | 19.4 | PASS |
| 4 | 14.9 | PASS |
Is there any way to achieve this row insertion (preferably with column spanning) using the Wicket DataTable constructs. As I dig down into the source I can find Item
renderers but nothing that deals with a row.
Currently I have the following:
// Create the sortable data provider.
SortableDataProvider<TestResult> provider = new SortableDataProvider<TestResult>() {
//... hibernate pagination code ...
};
List<IColumn> columns = new ArrayList<IColumn>();
columns.add(new TextFilteredPropertyColumn(new Model<String>("Test"), "test", "test"));
columns.add(new TextFilteredPropertyColumn(new Model<String>("Result"), "result", "result"));
columns.add(new TextFilteredPropertyColumn(new Model<String>("Appraisal"), "appraisal", "appraisal"));
// Create a new AJAX table using the sortable, filtered data provider.
final AjaxFallbackDefaultDataTable dataTable = new AjaxFallbackDefaultDataTable("testResultTable", columns.toArray(new IColumn[0]), provider, 20);// 20 = number of rows per page