⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bottitles.jsp

📁 Web开发的基本框架
💻 JSP
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="java.util.*"%>
<%@ page import="gird.multigrid.MultiOrderDataBean"%>
<%@ page import="gird.multigrid.OrderLineDataBean"%>
<%@ page import="org.loushang.web.taglib.util.*"%>
<%@ page import="org.loushang.util.Page"%>
<%@ page import="org.loushang.web.taglib.util.skin.SkinUtils"%>
<%@ page import="org.loushang.web.taglib.util.Global"%>
<%@ taglib uri="/tags/web-loushang" prefix="loushang"%>
<%@ taglib uri="/tags/web-grid" prefix="grid"%>
<%@ taglib uri="/tags/web-html" prefix="html"%>
<%@ taglib uri="/tags/web-loushang" prefix="loushang"%>
<%@ taglib uri="/tags/web-widgets" prefix="widgets"%>
<%@ taglib uri="/tags/web-tab" prefix="tab"%>
<%@ taglib uri="/tags/web-seltree" prefix="tree"%>
<%@ taglib uri="/tags/web-i18n" prefix="web"%>
<link rel="stylesheet" type="text/css" href="<loushang:ui css='skin.css'/>">
<link rel="stylesheet" type="text/css" href="<loushang:ui css='XMLSelTree.css'/>">

<web:js src="inching.js"/>
<web:js src="grid.js"/>
<web:js src="calendar.js"/>
<web:js src="tab.js"/>
<web:js src="XMLSelTree.js"/>

<html>
<head>
<title></title>
</head>
<form>
<table width="100%">
	<tr>
		<td><label class="title">普通 tab页组件</label></td>
		<%
		String file = request.getServletPath().substring(1);
		String app = request.getContextPath();
%>
		<td><label class="title">url:<%=file%></label></td>
		<td align="right" valign="bottom" nowrap>&nbsp;[<a
			href="<%=app%>/src.jsp?target=<%=file %>" target="source">源代码</a>]&nbsp;</td>
	</tr>
</table>
<hr>

<body>
<%

		MultiOrderDataBean dataBean = new MultiOrderDataBean();
		request.setAttribute(Global.getString("html.data"), dataBean);

		List pleValues = new ArrayList();
		Map map = null;
		map = new HashMap();
		map.put("name", "aa");
		map.put("value", "bb");
		pleValues.add(map);
		map = new HashMap();
		map.put("name", "cc");
		map.put("value", "dd");
		pleValues.add(map);
		request.setAttribute("pleValues", pleValues);
		%>
<%ArrayList treelist = new ArrayList();
		for (int i = 1; i <= 3; i++) {
			HashMap hash = new HashMap();
			hash.put("nodeId", String.valueOf(i));
			hash.put("CheckData", String.valueOf(i));
			if (i == 1) {
				hash.put("title", "北京");
				hash.put("nodeXmlSrc", "");
			}
			if (i == 2) {
				hash.put("title", "山东");
				hash.put("nodeXmlSrc", "");
			}
			if (i == 3) {
				hash.put("title", "辽宁");
				hash.put("nodeXmlSrc", "");
			}
			treelist.add(hash);
		}
		request.setAttribute("tree", treelist);

		%>
<center style="margin-top:50px;">

<tab:tab id="tab2" titleAt="bottom" width="450" height="250">

	<tab:card id="card" text="测试一">
		<table width="100" border=1>
			<tr>
				<td>第一个<input type="text" name="tab1_t1" value="第一个"></td>
				<td>
				<button name="test" onclick="tab2.showCard(1);grid1.show();">显示"测试表格"</buton>
				</td>
			</tr>
		</table>
	</tab:card>

	<tab:card id="card1" text="测试表格" onclick="grid1.show();">
			<html:button name="button1" value="增加行" onclick="doclick2();"></html:button>
			<html:button name="button2" value="删除行" onclick="doclick3();"></html:button>
			<grid:grid name="grid1" sumRow="true" headCss="divToucss"
				sumCss="divSumcss" complexHead="false" property="orderLines"
				type="edit" detailHeight="200" sumHeight="20" width="100%"
				height="160">
				<grid:checkboxCol caption="选择" width="100" index="1" name="aa"></grid:checkboxCol>
				<grid:indexCol caption="索引列" width="50" index="2" name="bb"
					readonly="false" style="width:100%"></grid:indexCol>
				<grid:textCol property="itemId" caption="商品编号" name="itemId"
					width="100" index="3" readonly="false" style="width:100%"></grid:textCol>
				<grid:textCol property="coNum" caption="订单编号" name="coNum"
					width="100" index="4" style="width:100%"></grid:textCol>
				<grid:textCol property="pri" name="pri" caption="批发价" width="100"
					index="5" style="width:100%"
					sumScript="grid1.setSumFieldValue(0,5,grid1.sum(5))"
					onblur="grid1.CountSum();"></grid:textCol>
				<grid:textCol property="pri3" name="pri3" caption="市场价" width="100"
					index="6" style="width:100%"
					sumScript="grid1.setSumFieldValue(0,6,grid1.sum(6))"
					onblur="grid1.CountSum();"></grid:textCol>
				<grid:primaryKeyCol property="itemId" name="itemId" caption="主键列"
					width="0" index="7" style="width:100%"></grid:primaryKeyCol>
				<grid:hideCol property="issDate" name="issDate" caption="隐藏列"
					width="0" index="8" style="width:100%"></grid:hideCol>
				<grid:selectCol property="note" name="note" size="1" caption="仓库"
					index="9" width="100">
					<grid:options collection="pleValues" property="value"
						labelProperty="name" />
				</grid:selectCol>
			</grid:grid>
	</tab:card>

	<tab:card id="card2" text="测试树">
		<table width=100% height=100% ALIGN=center>
			<tr>
				<td><tree:selTree treeName="seltree" containId="SrcDiv"
					isShowElseBranch="true" type="checkbox" hasRoot="true"
					rootText="中国"
					style="width:180;height:100%;overflow:auto;white-space:nowrap;">
					<tree:selNode title="$nodeId+title" nodeId="nodeId"
						collection="tree" nodeXmlSrc="nodeXmlSrc" caption="caption">
					</tree:selNode>
				</tree:selTree></td>
			</tr>
		</table>
	</tab:card>
	<tab:card text="测试四">
		<table width="100%" border=1>
			<tr>
				<td>第四个<input type="text" name="tab1_t4" value="第4个"></td>
				<td>
				<button name="test" onclick="alert(tab2.getTitle(0));">获得第一个标题</buton>
				</td>
			</tr>
		</table>
	</tab:card>
</tab:tab> 
</center>
<script language="javascript">
seltree.clickImg=function(node){
  seltree.xmlsrc="getxml.jsp?nodeId="+node.NodeId;    
} 
seltree.clickText=function(node){
  seltree.xmlsrc="getxml.jsp?nodeId="+node.NodeId; 
  lench=node.children.length;
  if(lench==0){
     alert("现在是末级节点 nodeId="+node.NodeId+"  title="+node.title+"\n");		  
  }
  }
function showcheckdata(){
	alert( "\n您选中的checkbox数据:"+seltree.GetAllCheckData()+"\n您选中的checkbox内容文本:"+seltree.GetAllCheckText());
}
function showselecteddata(){	
   var nodeId=seltree.getValue("NodeId");
   if(nodeId){
   alert("\n目前您选中的checkbox数据:seltree.getValue(\"NodeId\")="+seltree.getValue("NodeId")+"\n GetValue(\"title\")="+seltree.getValue("title"));
   }
}
seltree.loadRightMouseMenu()
{
		seltree.insertNodeMenu(new Array("进入编辑状态"),new Array("enterEditMode();"),new Array("dddddd"));
		seltree.insertLeafMenu(new Array("test"),new Array("message();"),new Array("dddddd"));
}
function addnodemenu()
{
	seltree.TreeConfig.DataAsync = true;
	seltree.insertNodeMenu(new Array("进入编辑状态"),new Array("enterEditMode();"),new Array("dddddd"));
}
function enterEditMode()
{
	seltree.TreeConfig.DataAsync = false;
	seltree.insertNodeMenu(new Array("刷新本节点","退出编辑状态"),new Array("seltree.refreshCurrNode();","addnodemenu();"),new Array("dddddd",""));
}
function message(){
	seltree.clearContextMenu(true);
}
function doclick2()
{
grid1.addRow();
}
function doclick3()
{
grid1.delRow();
}
</SCRIPT>
</body>
</form>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -