Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.1, 5.3.2
    • Fix Version/s: 5.4
    • Component/s: None
    • Labels:
      None

      Description

      I can't make a tree leaf selectable. When I click on a leaf there's a javascript error in tree.js:

      function doAnimate(element) {
      var sublist = $(element).up('li').down("ul");

      var dim = sublist.getDimensions();
      tree.js:52TypeError: 'undefined' is not an object (evaluating 'sublist.getDimensions')

      var duration = Math.min(dim.height * cfg.ANIMATION_RATE,
      cfg.MAX_ANIMATION_DURATION)

      new Effect.toggle(sublist, cfg.TOGGLE_TYPE, {
      duration : duration,
      queue :

      { position : 'end', scope : cfg.QUEUE_NAME }

      });
      }

      It (sublist) is undefined because I clicked on 'tree_1', which has an 'li' up from it but no 'ul' down from there:

      <li>
      <span id="tree_1" class="t-tree-icon t-leaf-node t-tree-expanded"></span>
      <span class="t-tree-label t-selectable">
      100 Philosophy
      </span>
      </li>

      I saw in TAP5-1629 that I have to provide a TreeSelectionModel if I want it to be selectable, and that is what I had done:

      <t:tree t:id="tree" t:model="treeModel" t:selectionModel="selectionModel"/>

      public TreeSelectionModel<CategoryNode> getSelectionModel() {
      if (selectionModel == null)

      { selectionModel = new DefaultTreeSelectionModel<CategoryNode>(); }

      return selectionModel;
      }

        Issue Links

          Activity

          Geoff Callender created issue -
          Geoff Callender made changes -
          Field Original Value New Value
          Link This issue is related to TAP5-1562 [ TAP5-1562 ]
          Howard M. Lewis Ship made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Howard M. Lewis Ship [ hlship ]
          Fix Version/s 5.4 [ 12316401 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Geoff Callender
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development