2018-06-03 22:26:41 +08:00

65 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK"%><%@
include file="/IncludeBegin.jsp"%><%
/*
页面说明:示例对象信息查看页面
*/
String PG_TITLE = "JBO生成树图"; // 浏览器窗口标题 <title> PG_TITLE </title>
String PG_CONTENT_TITLE = "&nbsp;&nbsp;JBO生成树图&nbsp;&nbsp;"; //默认的内容区标题
String PG_CONTNET_TEXT = "请点击左侧列表";//默认的内容区文字
String PG_LEFT_WIDTH = "200";//默认的treeview宽度
//获得页面参数
String sExampleId = CurPage.getParameter("ObjectNo");
//定义Treeview
OHTMLTreeView tviTemp = new OHTMLTreeView(CurPage, "JBO生成树图","right");
//定义树图结构
String sSqlTreeView = "from O where CodeNo='ExampleTree' and IsInUse='1' ";
tviTemp.init(JBOFactory.getBizObjectManager("jbo.sys.CODE_LIBRARY"), "SortNo","ItemName","ItemName","","",sSqlTreeView);
//参数从左至右依次为:
//ID字段(必须),Name字段(必须),Value字段,Script字段,Picture字段,From子句(必须),OrderBy子句,Sqlca
%><%@include file="/Resources/CodeParts/View04.jsp"%>
<script type="text/javascript">
function openChildComp(sURL,sParameterString){
sParaStringTmp = "";
sLastChar=sParameterString.substring(sParameterString.length-1);
if(sLastChar=="&") sParaStringTmp=sParameterString;
else sParaStringTmp=sParameterString+"&";
/*
* 附加两个参数
* ToInheritObj:是否将对象的权限状态相关变量复制至子组件
* OpenerFunctionName:用于自动注册组件关联REG_FUNCTION_DEF.TargetComp
*/
sParaStringTmp += "ToInheritObj=y&OpenerFunctionName="+getCurTVItem().name;
AsControl.OpenView(sURL,sParaStringTmp,"right");
}
//treeview单击选中事件
function TreeViewOnClick(){
//var sCurItemID = getCurTVItem().id;
var sCurItemname = getCurTVItem().name;
if(sCurItemname=="基本信息"){
openChildComp("/FrameCase/widget/ow/DemoList.jsp","");
}else if(sCurItemname=="其他信息1"){
openChildComp("/FrameCase/widget/ow/DemoList.jsp","");
}else if(sCurItemname=="其他信息2"){
openChildComp("/FrameCase/widget/ow/DemoList.jsp","");
}else if(sCurItemname=="其他的信息"){
openChildComp("/FrameCase/widget/ow/DemoList.jsp","");
}else if(sCurItemname=="另外的信息"){
openChildComp("/FrameCase/widget/ow/DemoList.jsp","");
}
setTitle(getCurTVItem().name);
}
function initTreeView(){
<%=tviTemp.generateHTMLTreeView()%>
expandNode('root');
selectItemByName("基本信息");
}
initTreeView();
</script>
<%@ include file="/IncludeEnd.jsp"%>