Skip to content

Instantly share code, notes, and snippets.

@ethanfu
Created May 22, 2013 14:41
Show Gist options
  • Save ethanfu/5628050 to your computer and use it in GitHub Desktop.
Save ethanfu/5628050 to your computer and use it in GitHub Desktop.
示例jsp
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsp/include/global.jsp" %>
<fmt:bundle basename="gap.dd.dd_resource" prefix="gap.dd.">
<script src="<%=request.getContextPath()%>/dwr/interface/TreeControl.js" type="text/javascript"></script>
<%@ include file="/jsp/dd/include/dwr.jsp" %>
<%@ include file="/jsp/dd/include/jquery.jsp" %>
<script type="text/javascript" src="<venus:base/>/js/dd/common.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/dd/basedata/basedata.js"></script>
<script language="javascript" src="<venus:base/>/js/dd/gap-ajaxList-tree.js"></script>
<STYLE TYPE="text/css" >
.tree_node_onfocus{
TEXT-DECORATION: none;
background-color: highlight;
color:white;
}
ul.rootNode{
CURSOR: default; MARGIN-LEFT: 5px; MARGIN-RIGHT: 5px; MARGIN-TOP: 5px;padding-top:0px; padding-left:0px;
}
ul.baseNode{
MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px; MARGIN-TOP: 0px;MARGIN-BOTTOM: 0px;padding-top:0px; padding-left:0px;
}
LI {
MARGIN-LEFT: 15px;LIST-STYLE: none; MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px; VERTICAL-ALIGN: middle
}
</STYLE>
<script>
/*
*校验名称为formName值的form 中的控件
*form控件
*/
</script>
</head>
<body onload="javascript:initTree(rootId,'tree');">
<script language="javascript">
writeTableTop('<fmt:message key="basedata.detailpage_title"/>','<venus:base/>/');
</script>
<form name="form_treebasic" method="post">
<input id="formName" name="formName" type="hidden" value="form_treebasic"/>
<input id="divid" name="divid" type="hidden" class="text_field" value="" readonly="true"><!-- 节点层id -->
<input id="rootFlag" name="rootFlag" type="hidden" class="text_field" value="" readonly="true"><!-- 是否有根节点 -->
<input id="id" name="id" type="hidden" class="text_field" value="" readonly="true">
<input id="webModel" name="webModel" type="hidden" class="text_field" value="<%=request.getContextPath()%>" readonly="true"><!-- 发布目录 -->
</form>
<div id="ccParent1">
<table class="table_div_control">
<tr>
<td>
<img src="<venus:base/>/images/icon/07-0.gif" class="div_control_image" onClick="javascript:hideshow('ccChild1',this,'<venus:base/>/')"><fmt:message key="common.dynamic_tree" ></fmt:message>
</td>
</tr>
</table>
</div>
<div id ='ccChild1' class="table_div_content">
<!--树控件页面-->
<div id="tree" style="width:25%; float:left;height:500;background-color:#ffffff;border :1px solid #90b3cf;; overflow:auto;">
</div>
<!--编辑页面-->
<div id="rightPanel" style="width:74%;float:right;display:none">
<form id="form_treeNode" name="form_treeNode" method="post">
<input name="formName" type="hidden" value="form_treeNode"/>
<!--操作信息-->
<div id="toolBarDiv-1" class="table_div_control" style="width: 100%;display:block">
<input type="button" id="gobackNode" name="gobackNode" style="float:right" class="button_ellipse" value='<fmt:message key="return" bundle="${applicationResources}"></fmt:message>' onClick="javascript:history.go(-1);">
<input type="button" id="deleteButton" name="deleteButton" style="float:right" class="button_ellipse" value='<fmt:message key="delete" bundle="${applicationResources}"></fmt:message>' onClick="javascript:deleteNode_onClick();">
<input type="button" id="addButton" name="addButton" style="float:right" class="button_ellipse" value='<fmt:message key="add" bundle="${applicationResources}"></fmt:message>' onClick="javascript:addNode_onClick();">
</div>
<!--详细信息-->
<div id="treeNodeMessageDiv" style="display:block">
</div>
<!--保存按钮-->
<div id="toolBarDiv-2" style="display:block">
<div class="table_div_content" >
<input type="button" id="updateNodes" name="updateNodes" class="button_ellipse" value='<fmt:message key="save" bundle="${applicationResources}"></fmt:message>' onClick="javascript:saveNode_onClick();">
</div>
</div>
</form>
</div>
<!--缺省页面-->
<div id="default" style="display:block;width:59%;float:right">
<br>
<br>
<table class="table_noFrame" width="96%" align="center">
<tr>
<td align="left"><img src="<%=request.getContextPath()%>/images/dd/yq_bt.jpg" width="73" height="14"> <br> <br>
请点击左边的节点树选择您要操作的基础数据。 <br> <br>
[修改] 在详细信息页面修改数据后,点击保存按钮,改变当前节点信息。<br><br>
[新增] 弹出新增页面,录入数据后点击保存按钮,在当前选中节点下增加子节点。<br><br>
[删除] 删除当前选中节点及所有子节点。<br><br>
[返回]返回到上一页面。<br><br>
</td>
</tr>
</table>
</div>
</div>
<!-- 参照显示层 -->
<div id="iframeDialog" style="display:none">
</div>
</fmt:bundle>
<script language="javascript">
writeTableBottom('<venus:base/>/');
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment