Dirk Germonpré created WICKET-5520:
--------------------------------------
Summary: improve reusability of DataTable and AbstractPageableView
Key: WICKET-5520
URL: https://issues.apache.org/jira/browse/WICKET-5520
Project: Wicket
Issue Type: Improvement
Components: wicket, wicket-extensions
Affects Versions: 6.14.0
Reporter: Dirk Germonpré
I have a use case for the
org.apache.wicket.extensions.markup.html.repeater.tree.TableTree that asks for
some small modifications to the classes
org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable and
org.apache.wicket.markup.repeater.AbstractPageableView. I would like to show a
tree structure (only one level deep) in the TableTree where the number of items
on a single page is not a fixed number of lines, but the number of top level
nodes of the tree structure.
For this the following changes are needed:
In AbstractPageableView the method getPageCount should no longer be final.
In DataTable the constructor creates a DataGridView and assigns is to the
member datagrid. The creation of the DataGridView should be refactored to a
factory method (for example newDataGrid). The anonymous inner class should be
replaced by a named inner class (a good name would be DefaultDataGridView).
This inner class should be protected, so it can be subclassed.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)