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

Null reference in method _showKids in zul.sel.Treeitem

    XMLWordPrintable

    Details

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

      Description

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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: