Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-4247

Catalog: table may disappear when setting a filter

    XMLWordPrintable

    Details

      Description

      If the catalog is filtered e.g. by upcoming courses the result may be empty and the whole table disappears from the GUI. There is no possibility to reset the filter because the controller is not put to the container.

      This patch fixes that for me:

      diff --git a/src/main/java/org/olat/repository/ui/catalog/CatalogNodeController.java b/src/main/java/org/olat/repository/ui/catalog/CatalogNodeController.java
      index fbef68d..3c930ed 100644
      --- a/src/main/java/org/olat/repository/ui/catalog/CatalogNodeController.java
      +++ b/src/main/java/org/olat/repository/ui/catalog/CatalogNodeController.java
      @@ -148,7 +148,7 @@
       		searchParams.setClosed(Boolean.FALSE);
       		
       		entryListController = new RepositoryEntryListController(ureq, wControl, searchParams, true, false, "catalog", stackPanel);
      -		if(!entryListController.isEmpty()) {
      +		if(!entryListController.isEmpty() || searchParams.getFilters() != null) {
       			mainVC.put("entries", entryListController.getInitialComponent());
       		}
       		listenTo(entryListController);
      @@ -159,7 +159,7 @@
       		searchClosedParams.setParentEntry(catalogEntry);
       		searchClosedParams.setClosed(Boolean.TRUE);
       		closedEntryListController = new RepositoryEntryListController(ureq, wControl, searchClosedParams, true, false, "catalog-closed", stackPanel);
      -		if(!closedEntryListController.isEmpty()) {
      +		if(!closedEntryListController.isEmpty() || searchClosedParams.getFilters() != null) {
       			mainVC.put("closedEntries", closedEntryListController.getInitialComponent());
       		}
       		listenTo(closedEntryListController);
      

       

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            stephan Stephan Clemenz
            Tester:
            Mandy Menzel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m