Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-1267

HierarchicalJcrContainer should be provided by IOC - Filtered properties should be changeable

XMLWordPrintable

      The use case (see print screens):
      I created a new sub app in the pages app, for displaying former JCRBrowser alike all data. For this I created an new action "View JCR Browser" where it opens the page in the subapp "Jcr Data View".
      I had to use this approach, cause you can't register different tree content views in one workspace behaving differently (different columns, different display of properties etc).
      There I was easily capable of changing that it displays:

      • Area and Component nodes
      • All properties and its values
      • An extra column displaying the jcrPrimaryType
      • Adapting the template columns that it displays the jcrPrimaryType where no template (RenderableDefinition) is defined in the meta data.

      Not the next step I tried to achieve, the use case I can't implement:

      • Displaying all the meta data properties.
        (The next idea would have been, having the meta data properties not editable, but all other properties are editable. That could be decided on the prefix they have.)

      The problem:
      The class info.magnolia.ui.workbench.tree.HierarchicalJcrContainer defines hard coded in the method info.magnolia.ui.workbench.tree.HierarchicalJcrContainer.getChildren(Item) what properties should be filtered. Using some inject-able Filter object would make that more flexible.
      No matter, thought I extend this class and just override (even if cumbersome, just for try out) that method.

      The problem there is, that the class info.magnolia.ui.workbench.tree.TreeViewImpl allocated the Container not by IOC, but by 'new'. Ok, lets override the receiving class of the container and override this one, just allocating there my Container class in: info.magnolia.ui.workbench.tree.TreeViewImpl.buildTreeTable(Container, WorkbenchDefinition, ComponentProvider)
      But this method is private.

      -> Cant do it without copying the complete TreeViewImpl class just to change that line of code

       this.container = new HierarchicalJcrContainer(workbench);
      

        Acceptance criteria

              Unassigned Unassigned
              cringele Christian Ringele
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD