网站地图
  
  高级搜索
  首页   技术论坛   博客   产品中心   资源中心   银弹在线   商城  





请教,搭建框架的问题!    
#1楼
给作者发送短消息 给作者发送短消息 实名会员 
查看用户其他信息
总分 59 分
财富 267 goCom币
威望 21
排名 :(
段位 新手必读

我想将自己以前的一个J2EE项目的框架整合到EOS项目中去!

因为我觉得EOS开源组织框架不是很好,没有采用国人比较认可的左边树形,右边操作界面的方式!!

现在遇到的问题就是,在生成左边树形菜单时,

请问:

1、JS调用的业务逻辑时,如果要返回菜单列表的List,JS还可以利用返回的List生成树吗?如果可以返回的话,应该如何操作写?

2、J2EE中的Dao层应该写到什么地方?

谢谢!!

 

Re: 请教,搭建框架的问题!    
#2楼
给作者发送短消息 给作者发送短消息 实名会员 
查看用户其他信息
总分 766 分
财富 2037 goCom币
威望 2002
排名 :(
段位 新手必读
下面是改造过的JS,可以产生树型菜单!仅供参考。
 

Re: 请教,搭建框架的问题!    
#3楼
给作者发送短消息 给作者发送短消息 实名会员 
查看用户其他信息
总分 766 分
财富 2037 goCom币
威望 2002
排名 :(
段位 新手必读
var i=0;


function creatTree(){
//取得生成树的数据
var leftMenuStr = top.topFrame.leftMenuHtml;



//将取得的数据转化成 DOM
var xmlDoc = document.all.menuXML.XMLDocument;
xmlDoc.async="false";
xmlDoc.loadXML(leftMenuStr);
var s_menu = xmlDoc.xml;
//window.alert(s_menu);

var rootn = document.all.menuXML.documentElement;
var tree =new WebFXTree(" ");
//new WebFXTree(rootn.getAttribute("text"));
tree.action = "";


buildTree(rootn,tree);

if("信息概览"==rootn.getAttribute("text")){
tree =new WebFXTree("信息概览");

window.parent.oa_frame.cols="0,0,*";
parent.rightWorkSpace.window.location.href="default.pr_automata.forward.do?nextPage=/demoIT/page/portal.jsp";
}
else
window.parent.oa_frame.cols="180,10,*";

document.write(tree);


}

function buildTree(eos_DOM,bTree){
if(eos_DOM.hasChildNodes()){

var nodes=eos_DOM.childNodes;
for(j=0;j var temp = new WebFXTreeItem(nodes[j].getAttribute("text"));
temp.entityId=i++;

if("null"==nodes[j].getAttribute("href"))
temp.action="";
else{
temp.action= nodes[j].getAttribute("href");
temp.target= "rightWorkSpace";
if(0==j)
parent.rightWorkSpace.window.location.href=temp.action;

}
bTree.add(temp);

if(nodes[j].hasChildNodes){
temp.text=" "+temp.text;
var s_nodes=nodes[j].childNodes;
for(k=0;k var s_temp = new WebFXTreeItem(s_nodes[k].getAttribute("text"));
s_temp.entityId=i++;


s_temp.action= s_nodes[k].getAttribute("href");
s_temp.target= "rightWorkSpace";

if(0==j&&0==k)
parent.rightWorkSpace.window.location.href=s_temp.action;

temp.add(s_temp);
}



}
}
}
}

creatTree();
 




发表回复
账号用户名   密码   登录
内容:url email imgsrc image code quote
范例 Example
bold italic underline linethrough   


 [更多...]