[MAGNOLIA-3585] JCR Browser should show all types Created: 03/Mar/11  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia
Component/s: admininterface
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Magnolia International Assignee: Unassigned
Resolution: Won't Do Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MAGNOLIA-2950 user tree shows folders of type mgnl:... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

When using the jcrbrowser tree to display a workspace that uses different node types, one has to subclass the treeConfiguration class to allow those types.

Since MAGNOLIA-2950 (Magnolia 4.2), we could replace info.magnolia.module.admininterface.trees.JcrBrowserTreeConfiguration#prepareTree with the following code, we will display ALL nodes of that workspaces. (Note that this includes (mgnl:)MetaData as well as jcr:system nodes and its subnodes)

    @Override
    public void prepareTree(Tree tree, boolean browseMode, HttpServletRequest request) {
        super.prepareTree(tree, browseMode, request);
        tree.addItemType("nt:base", null, false);

        tree.addColumn(makeNodeTypeColumn(tree));
    }

    protected TreeColumn makeNodeTypeColumn(Tree tree) {
        final TreeColumn nodeType = TreeColumn.createColumn(tree, "Node type", new TreeColumnHtmlRenderer() {
            public String renderHtml(TreeColumn treeColumn, Content content) {
                try {
                    return content.getNodeType().getName();
                } catch (RepositoryException e) {
                    log.error("Can't get node type for {}", content, e);
                    return "error: " + e.getMessage();
                }
            }
        });
        nodeType.setWidth(2);
        return nodeType;
    }


 Comments   
Comment by Magnolia International [ 03/Mar/11 ]

Hmm, just testing this to browse the users workspace, and sure enough, MAGNOLIA-2950 reappears (it even displays some folders thrice, for some reason). Not investigating further right now, but it would thus appear that the patch above needs some more work.

Comment by Jan Haderka [ 19/Jul/11 ]

Obviously it is not as simple as would seem from the description.
I would also like to point out that I do not want to show jcr:system and mgnl:metaData.

Comment by Michael Mühlebach [ 04/Nov/15 ]

Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes.
Thanks for taking the time to raise this issue. As you are no doubt aware this issue has been on our backlog for some time now with very little movement.
I'm going to close this to set expectations so the issue doesn't stay open for years with few updates. If the issue is still relevant please feel free to reopen it or create a new issue.

Generated at Mon Feb 12 03:47:51 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.