Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-1651

List view: selecting all items with the checkbox in the table header issues UnsupportedOperationException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.0
    • 5.0
    • tree/list
    • None

    Description

      In the list view, selecting all items with the checkbox in the table header issues UnsupportedOperationException: info.magnolia.ui.workbench.list.FlatJcrContainer does not support this method.

      After some investigation I came up with four options

      • 1: JCR query for all elements
        public Collection<String> getItemIds() {
                ...
                    QueryResult result = executeQuery(getQuerySelectStatement(), Query.JCR_JQOM, 0, 0);
                ...
            } 
        • Drawbacks: Returning 536 items between 8 to 17 ms (according to my rough measurements) - Visible delay in the UI - resources consuming? Using limit and offset (last two args of executeQuery) as we do in AbstractJcrContainer.getPage() does not select all the visible items but, apparently, some of them randomly
      • 2: Return empty collection - looks broken as no items get selected but still better than the error message
      • 3: Disable checkbox in table header
      • 4: using Vaadin’s ContainerHelpers.getItemIdsUsingGetIdByIndex(0, size()...)
        • looks faster than the JCR query approach (about 1ms to fetch the ids) still the rendering on the UI seems as slow as in option one and the method is not recommended in production by Vaadin itself.

      Eventually, we settled for option 3 and will re-introduce the "select all" option later on after finding a solution to the slow rendering issue.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                fgrilli Federico Grilli
                fgrilli Federico Grilli
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD