Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1636

Let BindingListModelListModel implement Sortable

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Databind, Databind 2
    • Environment:

      ZK Version: 6.5.1.1 Build: 2012121311

      Description

      I have the following situation:

      • A listbox with data taken from a model
      • All listheaders have comparators set for each direction (using setSortAscending/setSortDescending)
      • The listbox should allow multiple selection

      I was previously (i.e., ZK <= 5.0.8) using a ListModelList in my composer. I kept using it, calling setMultiple(true) on it, until I found out that the the sorting was broken. This is because the listbox doesn't see the original ListModelList , but a BindingListModelListModel, which doesn't implement Sortable, even when the model retrieved by getInnerModel() does. Thus, I was getting a message of the sort of "Sortable must be implemented by BindingListModelListModel" or so.

      I suggest that either:
      a) BindingListModelListModel supports Sortable, throwing a runtime exception when sort() or getSortDirection() are called on an inner model that doesn't implement Sortable.
      b) Listbox/grid treat BindingListModelListModel apart, checking if the inner model supports Sortable.

      I anyways bypassed the problem by offering a BindingListModelList directly from my composer.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rtobar rtobar
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: