-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
None
-
None
-
-
Yes
-
Empty show more show less
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; }
Acceptance criteria
- depends upon
-
MAGNOLIA-2950 user tree shows folders of type mgnl:folder twice
- Closed