Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5520

improve reusability of DataTable and AbstractPageableView

    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

        1. abstractpageableview.patch
          0.9 kB
          Dirk Germonpré
        2. datatable.patch
          4 kB
          Dirk Germonpré

          Activity

            People

            • Assignee:
              mgrigorov Martin Grigorov
              Reporter:
              dirk.germonpre@gmail.com Dirk Germonpré
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: