JCR Browser should show all types
---------------------------------
Key: MAGNOLIA-3585
URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3585
Project: Magnolia
Issue Type: Improvement
Components: admininterface
Reporter: Grégory Joseph
Assignee: Philipp Bärfuss
Fix For: 4.4.3
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.
By replacing
{{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)
{code}
@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) {
return "error";
}
}
});
nodeType.setWidth(2);
return nodeType;
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------