问题描述
后台Action里返回一个tree.toString(),tree是StringBuffer类型返回是[{id:'67450_0',text:'主体',leaf:false}]格式字符串,我现在想实现是在ext里得到这个字符串长度,请问应该怎么写?Ext里部分代码varroot=newExt.tree.AsyncTreeNode({text:name+'根元素',id:'00',expanded:true,allowDrag:false,allowDrop:true,loader:newExt.tree.TreeLoader({dataUrl:'caseCreatetreeAction.do?method=createTree',clearOnLoad:true})});Action里部分代码System.out.println(tree.toString());try{response.getWriter().write(tree.toString());}catch(IOExceptione){e.printStackTrace();}
时间: 2024-09-23 02:49:15