Null reference in method _showKids in zul.sel.Treeitem

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Normal
    • None
    • Affects Version/s: 7.0.1
    • Component/s: General
    • None

      I have a tree with filtering. Items wich doesn't meet filtering conditions set invisible (treeItem.setVisible(false)). So childs of items can be not bound to the DOM tree. When I open or close items I get an error "Unable to get property 'style' of undefined or null reference" File: zul.sel.wpd, Line: 3685, Column: 5
      .
      I fixed this by overriding _showKids:

      zk.override(zul.sel.Treeitem.prototype, _wgt, {
      _showKids: function () {
      var tc = this.treechildren;
      if (tc)
      for (var w = tc.firstChild, vi = tc._isRealVisible(); w; w = w.nextSibling) {
      if(w.$n()){
      w.$n().style.display = vi && w.isVisible() && open ? '' : 'none';
      }
      if (w.isOpen())
      w._showKids(open);
      }
      }
      });

            Assignee:
            Unassigned
            Reporter:
            Svetlana
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: