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

TreePresenter: not beeing sortable by default makes no sense

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an issue
    • Icon: Neutral Neutral
    • None
    • 6.0
    • app framework
    • None
    • Windows 10

      Today i struggled with a Content App which was using the Hierarchical Container for a Tree view. I was wondering why the sort order configured in the Content Connector was not respected. Then i found out the beeing sortable by default is disabled for the TreePresenter:

      private static final String SAVE_ACTION_NAME = "saveItemProperty";
      private static final Logger log = LoggerFactory.getLogger(TreePresenter.class);
      private final UiContext uiContext;
      private final SimpleTranslator i18n;
      
      private boolean sortable = false; // <- why though?
      
      @Inject
      public TreePresenter(TreeView view, ComponentProvider componentProvider, UiContext uiContext, SimpleTranslator i18n) {
          super(view, componentProvider);
          this.uiContext = uiContext;
          this.i18n = i18n;
      }
      

      To me this seems odd - since the TreePresenter is infact capable of sorting it's content. So i can't think of a valid reason to disable this for tree views....

        Acceptance criteria

              slutz Simon Lutz
              martyglaubitz Marty Glaubitz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD