cmpManage.jsp页面
<page:applyDecorator name="content-inner" title="" encoding="GBK">
<script type="text/javascript">
/// XP Look
webFXTreeConfig.rootIcon = "<%= request.getContextPath() %>/img/xtree/xp/folder.png";
webFXTreeConfig.openRootIcon = "<%= request.getContextPath() %>/img/xtree/xp/openfolder.png";
webFXTreeConfig.folderIcon = "<%= request.getContextPath() %>/img/xtree/xp/folder.png";
webFXTreeConfig.openFolderIcon = "<%= request.getContextPath() %>/img/xtree/xp/openfolder.png";
webFXTreeConfig.fileIcon = "<%= request.getContextPath() %>/img/xtree/xp/file.png";
webFXTreeConfig.lMinusIcon = "<%= request.getContextPath() %>/img/xtree/xp/Lminus.png";
webFXTreeConfig.lPlusIcon = "<%= request.getContextPath() %>/img/xtree/xp/Lplus.png";
webFXTreeConfig.tMinusIcon = "<%= request.getContextPath() %>/img/xtree/xp/Tminus.png";
webFXTreeConfig.tPlusIcon = "<%= request.getContextPath() %>/img/xtree/xp/Tplus.png";
webFXTreeConfig.iIcon = "<%= request.getContextPath() %>/img/xtree/xp/I.png";
webFXTreeConfig.lIcon = "<%= request.getContextPath() %>/img/xtree/xp/L.png";
webFXTreeConfig.tIcon = "<%= request.getContextPath() %>/img/xtree/xp/T.png";
webFXTreeConfig.blankIcon = "<%= request.getContextPath() %>/img/xtree/blank.png";//var tree = new WebFXLoadTree("WebFXLoadTree", "tree1.xml");
//tree.setBehavior("classic");
var tree = new WebFXTree("[ 公司管理 ]")
var curTree = null
var subCmpsTree = null<%
for(int i=0;i<li.size();i++){
Cmp info = (Cmp)BeanLocalizer.getLocalizedBean(li.get(i));
info.setParentCmp((Cmp) BeanLocalizer.getLocalizedBean(info.getParentCmp()));
//System.out.println("size:"+info.getSubCmps().size());
try {
Iterator iterator = info.getSubCmps().iterator();
HashSet collection = new HashSet();
while (iterator.hasNext()) {
Cmp cmp=(Cmp)iterator.next();
collection.add(BeanLocalizer.getLocalizedBean(cmp));
}
if (!collection.isEmpty()){
//System.out.println("collection is not Empty-------------------------------"+collection.size());
info.setSubCmps(collection);
}
col.add(info);
}catch (Exception e) {e.printStackTrace();}
}

    if(pageContext.getAttribute("ngoss.humanresman.col")!=null){
      pageContext.removeAttribute("ngoss.humanresman.col");
      pageContext.setAttribute("ngoss.humanresman.col", col, PageContext.PAGE_SCOPE);
    }else{
    pageContext.setAttribute("ngoss.humanresman.col", col, PageContext.PAGE_SCOPE);
    }
%>
<logic:iterate id="coll" name="ngoss.humanresman.col" >
curTree= new WebFXTreeItem("<bean:write name='coll' property='cmpName' />")
subCmpsTree= new WebFXTreeItem("[ 下级公司1 ]")<%
//Session ses = HibernateUtil.currentSession();
//ses.beginTransaction();
//String hql="from Cmp as cmp where cmp.parentCmpNo="+((Cmp)coll).getCmpNo();
//List l =ses.createQuery(hql).list();
//pageContext.setAttribute("ngoss.humanresman.cmp1",l,PageContext.PAGE_SCOPE);
pageContext.setAttribute("ngoss.humanresman.cmp", coll, PageContext.PAGE_SCOPE);
//System.out.println("coll:"+coll);
%>curTree.add(new WebFXTreeItem("[ 基本信息 1]", "<html:rewrite module='/humanresman' action='cmpAction' paramId='no' paramName='ngoss.humanresman.cmp' paramProperty='cmpNo' />", null, null, null, "xtree-content"))
<logic:iterate id="list" name="ngoss.humanresman.cmp" property="subCmps">
subCmpsTree.add(new WebFXLoadTreeItem("<bean:write name='list' property='cmpName' ignore='true' />", "<html:rewrite action='cmpXNodeAction' module='/humanresman' paramId='no' paramName='list' paramProperty='cmpNo' />"))

</logic:iterate>
<%
Cmp cmp = (Cmp)pageContext.getAttribute("ngoss.humanresman.cmp");
if(cmp.getSubCmps()!=null&&cmp.getSubCmps().size()!=0){
%>
curTree.add(subCmpsTree)
<%
}
%>tree.add(curTree)
</logic:iterate>
document.write(tree)
</script>
</page:applyDecorator> </td>
<td>
<page:applyDecorator name="content-inner" title="" encoding="GBK">
<iframe id='xtree-content' name='xtree-content' src='' width='100%' height='100%' frameborder='0'></iframe>
</page:applyDecorator>cmpXNode.jsp
<%
HashSet collection1 = new HashSet();
OpAccessBean accessInfo=(OpAccessBean)session.getAttribute("[NGoss] OPAccessInfo");
NGossConfig ngossConfig = NGossConfig.getInstance();
Cmp info = (Cmp) BeanLocalizer.getLocalizedBean(request.getAttribute("ngoss.humanresman.info"));

//try {
//Iterator iterator = info.getSubCmps().iterator();
//while (iterator.hasNext()) {
// Cmp cmp=(Cmp)iterator.next();
// if(cmp.getRulable().equalsIgnoreCase("0"))
// collection1.add(BeanLocalizer.getLocalizedBean(cmp));
//}
// if (!collection1.isEmpty()) info.setSubCmps(collection1);
//}
//catch (Exception e) {}
if(pageContext.getAttribute("ngoss.humanresman.cmp")!=null){
   pageContext.removeAttribute("ngoss.humanresman.cmp");
   pageContext.setAttribute("ngoss.humanresman.cmp", info, PageContext.PAGE_SCOPE);
}else{
  pageContext.setAttribute("ngoss.humanresman.cmp", info, PageContext.PAGE_SCOPE);
}
  System.out.println("huxiaobo="+info.getCmpNo()+"co1.size="+collection1.isEmpty());
System.out.println("size="+info.getSubCmps().size());
 %><tree>
 <tree text="[ 基本信息2 ]" action="<html:rewrite module='/humanresman' action='cmpAction' paramId='<%= ngossConfig.getConfig("req-params.no.id") %>' paramName='ngoss.humanresman.cmp' paramProperty='cmpNo' />" target='xtree-content' />
<%
if (info.getSubCmps().size()!=0) {
 %>
  <tree text="[ 下级公司2 ]">
<logic:iterate id="list" name="ngoss.humanresman.cmp" property="subCmps">
<tree text="<bean:write name='list' property='cmpName' ignore='true' />" src="<html:rewrite action='cmpXNodeAction' module='/humanresman' paramId='<%= ngossConfig.getConfig("req-params.no.id") %>' paramName='list' paramProperty='cmpNo' />" />
</logic:iterate>
</tree>
<%
}
 %>
</tree>
效果图现在就是对节点的名称修改的时候,没办法刷新。就只能关掉浏览器再打开才能刷新,如何解决啊