创建extjs 树,伸展树时出现空白区域,请大家帮忙看看啊
创建树的代码如下:var tree = new Ext.tree.TreePanel({
   
        header: false,
        useArrows: true,
        enableDrag : true,
        ddGroup:'panel',
        width: '100%',
        height:480,
        animCollapse  :true,
        border : false,
        autoScroll: false,
        split: true,
        collapsible: true,
        containerScroll: false,
        shadow:'true',
        root: {
            nodeType: 'async',
            text: '筛选及显示字段',
            draggable: false,
            id: 'src'
       },
        rootVisible: true
});
tree.getRootNode().disabled =true;

解决方案 »

  1.   

    你本来就一个跟节点  没有其他节点的
    有没有loader
      

  2.   

    汗,至少得有个dataUrl,tree才能知道展开啥节点啊
      

  3.   

    我先创建一个空树,通过出发事件,来给树添加节点的
    var dataURL="<%=contextPath%>/inditionBrowse/dataMainu.action?timeTypeId="
    +timeId+"&dwClassId="+<%=dwClassId%>+"&dictdbId="+dictId;
    tree.loader.dataUrl=dataURL;
    tree.getRootNode().reload();树节点有内容,单数展开后,收回,出现一片空白区域