Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-3829

LinkPicker : starting location is saved on "cancel" + OK button shown when folder selected

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • r2.09.06
    • r2.12.03
    • None
    • None

    Description

      Recently the LinkPickerDialog has been modified so a starting location (folder) can be configured. This works for the most part, except for two minor (yet annoying) bugs:

      1. the root path of the linkpicker is assigned to the JCR property model (of the docbase property), before the dialog is shown. This will cause the rootpath (starting location) to be saved, even when you click "cancel"

      2. The OK button in the LinkPickerDialog is enabled by default, even though the selected node is a folder (in my case the starting location node). This allows users to illegally save a folder node in the facet select. I circumvented it in my custom plugin with the following code:

      JcrNodeModel selectedNodeModel = (JcrNodeModel) getInitialNode();
      Node selectedNode = (Node) selectedNodeModel.getObject();
      setOkEnabled(selectedNode != null && selectedNode.isNodeType("hippo:handle"));

      I can provide you with my custom code if you want..

      One other request: it would be great if you could change the code so the display value for the link can be overridden more easily, by means of extension of the default picker. In our project, we sometimes show the title of the document instead of the path to the document.

      Attachments

        Issue Links

          Activity

            People

              spelissier Sylvain PĂ©lissier (Inactive)
              dennis dam Dennis Dam (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: