Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2820

Null reference in method _showKids in zul.sel.Treeitem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 7.0.1
    • General

      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);
      }
      }
      });

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

              Created:
              Updated: