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

Grid Veiw to support more generic Grids

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • wicket
    • None

    Description

      Motivation: http://apache-wicket.1842946.n4.nabble.com/GridView-for-A-Symmetric-tables-issues-td2953859.html

      What adds to the difficulty:
      =====
      The

      {@link GridView}

      class assumes Symmetry of Rows x Cols. When one has to deviate from the Symmetric nature of the Grid then due to certain
      non standardized API methods being final or private the setRows() & setCols() have to been overridden.
      Since the getters & setters for rows & columns involve complex logic; anything that overrides it requires visibility of the variables this too becomes unfit for consumption.

      Suggestion for Improvement (And / Or any of the following):
      =====
      1. Either restructure the visibility of some attributes so people can extend this class for Assymetric views etc
      2. Introduce an Optional Abstract Data Structure "GridLayout or say AssymetricGridView" that defines what the layout of the grid should be (and write corresponding code around it).

      Minor Nomenclature issues (Something I noticed and thought I'd mention)
      =====
      1. internalSetRowsPerPage – The name of the method seems inappropriate. (specially when grids are asymmetric then what is a real Row?) .
      Even the class where it comes from "AbstractPageableView" says:

      • Sets the maximum number of items to show per page. The current page will
      • also be set to zero
        ... Item is perhaps more appropriate to use even in the method name. (if it does not upset too much) — I think this suggestion will never pass

      I have a sample implementation attached to this thread. This implementation solves the issue I mentioned in the User Forum.
      Frankly, this is a 90+% copy of GridView, but because it was too cumbersome to override the behavior I hacked my way around. Just a sample reference nevertheless.

      thanks

      Attachments

        1. AssymetricGridView.java
          12 kB
          Arjun Dhar
        2. GridPage_SampleOutput.png
          399 kB
          Arjun Dhar

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dhar_ar@yahoo.com Arjun Dhar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: