Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-407

List parent folder ("..") in document listing

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 2.01.00m03
    • addon-cms-prototype
    • None

    Description

      Suggestion from Bart:

      public SortableDocumentsProvider(JcrNodeModel model) {
      this.folder = new Folder(model);
      setSort("name", true);

      resources = folder.getSubFoldersAndDocuments();
      Folder parentFolder = folder.getParentFolder();
      if (parentFolder != null)

      { resources.add(parentFolder); }

      }

      public Iterator<NodeModelWrapper> iterator(int first, int count)

      { sortResources(); List<NodeModelWrapper> list = Collections.unmodifiableList(resources.subList(first, first + count)); return list.iterator(); }

      public IModel model(Object object)

      { return (NodeModelWrapper) object; }

      public int size()

      { return resources.size(); }

      Attachments

        Activity

          People

            niels Niels van Kampenhout (Oud) (Inactive)
            niels Niels van Kampenhout (Oud) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: