[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: |
|
||||||||
| 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
@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 ] |
|
|
| Comment by Jan Haderka [ 19/Jul/11 ] |
|
Obviously it is not as simple as would seem from the description. |
| 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. |