Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.0
-
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
- is superseded by
-
MGNLUI-1995 Add "select all" checkbox to top of views & solve problem on LIST and SEARCH containers.
-
- Closed
-