ACTION   OpenModifyExtractPositionById

// set单条数据属性

/*
* 通过ID修改提取位置表信息
*/
public String OpenModifyExtractPositionById(){
int code = Integer.parseInt(get("code").toString());
// 获取ID
String id = get("id").toString();
// 通过ID 查询出实体
Etlextractposition ep = this.etlService.QueryExtractPositionById(id);
String str = ep.getPositionNum();
// String str2 = "";
// String[] str1 = str.split(",");
// for(int i=0; i<str1.length; i++){
// if(str1[i].length()!= -1){
// if(i==0){
// str2+=str1[i]+"页";
// }
// if(i==1){
// str2+=str1[i]+"行";
// }
// if(i==2){
// str2+=str1[i]+"列";
// }
// }
// }

// 查询出所有元素 及字段属性
List<Baseelement> list1 = this.bscs.QueryAllBaseelement();
List<Etlextractposition> list2 = this.etlService.queryEtlextractpositions();
List<Etlextractposition> list3 = this.etlService.queryEtlextractpositionersversionNum();
List<Etlextractposition> list4 = this.etlService.queryEtlextractpositionersmeth();
// set属性
this.getRequest().setAttribute("str", str);
this.getRequest().setAttribute("entity", ep);
this.getRequest().setAttribute("code", code);
this.getRequest().setAttribute("list1", list1);
this.getRequest().setAttribute("list2", list2);
this.getRequest().setAttribute("list3", list3);
this.getRequest().setAttribute("list4", list4);
return "success";
}

JSP

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/share/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加功能模块</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.STYLE1 {font-size: 12px}
.STYLE3 {font-size: 12px; font-weight: bold; }
.STYLE4 {
color: #03515d;
font-size: 12px;
}
-->
</style>

<script type="text/javascript" charset="utf-8" src="../js/formTest.js"></script>
<script language=javascript>
function window.onload() {
if(top.location != self.location){
var a = window.parent.document.getElementsByTagName('iframe');
for (var i=0; i<a.length; i++){
if (a[i].name == self.name) {a[i].height = document.body.scrollHeight; return;}}}
}

</script>

<script type="text/javascript">
function check()
{
var positionNum=document.getElementById("positionNum").value;
var classtype=document.getElementById("classtype").value;
var versionNum=document.getElementById("versionNum").value;
var orderNum=document.getElementById("orderNum").value;
var type=document.getElementById("type").value;
var meth=document.getElementById("meth").value;
if(check1(positionNum,"位置信息")&&NUM(classtype,"基础元素")&&NUM(versionNum,"版本号")
&&NUM(orderNum,"顺序号")&&NUM(type,"类别")&&NUM(meth,"校验方法")){}
else{return false;}
}
function check1(value,name){
var reg=/^[0-9]{1,4}[,]{1}[0-9]{1,4}[,]{1}[0-9]{1,4}$/;
if(reg.test(value)) {
return true;
}else {
alert(name+"要以数字开头,可以使用英文逗号,分隔");
return false;
}
}

</script>
<link href="../css/global.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="stylesheet" href="../css/calendar.css" />
<script type="text/javascript" src="../myjs/WdatePicker.js"></script>

</head>

<body>
<form action="../CheckAction/ModifyExtractPositionById.action" method="post" name="login" onSubmit="return check();">
<input name="code" id="code" type="hidden" class="textBox" value="${code}" size="24" maxlength="32" />

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" background="../images/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="30"><img src="../images/tab_03.gif" width="12" height="30" /></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46%" valign="middle"><table width="459" border="0" cellspacing="0" cellpadding="0" height="20">
<tr>
<td width="5%"><div align="center"><img src="../images/tb.gif" width="16" height="16" /></div></td>
<td width="95%" class="STYLE1"><span class="STYLE3">修改提取位置详情</span> </td>
</tr>
</table></td>
<td width="54%"><div align="right">

<a href="#" style="float:right"
onclick="if(window!=parent)
{parent.document.getElementById('popCloseBox').click();
parent.frames['ovfirame'].location='../CheckAction/ListEtlExtractPositionOfAll.action?code=${code }'}" >关闭此页</a></div></td>
</tr>
</table></td>
<td width="16"><img src="../images/tab_07.gif" width="16" height="30" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8" background="../images/tab_12.gif">&nbsp;</td>
<td>
<!--1start-->

<!--1end-->
<!--2start-->
<table width="100%" border="0"
cellspacing="0" rules="all" style="WIDTH: 100%; BORDER-COLLAPSE: collapse">
<input type="hidden" name="id" id="id" value="${entity.id }" />
<tr
onmouseover="currentcolor=this.style.backgroundColor;this.style.backgroundColor='#f0f7ff'"
onmouseout="this.style.backgroundColor=currentcolor">
<td width="10%" class="main_matter_td">位置信息</td>
<td width="40%" align="left" class="main_matter_td">
<input name="positionNum" id="positionNum" type="text" class="textBox" value="${str}" size="24" onblur="unamecheck();" />
${str2}

<c:forTokens items="${entity.positionNum}" begin="0" step="1" delims="," var="aValue" varStatus="status">
<!-- ${aValue} -->
<c:if test="${status.count==1}"><c:out value="${aValue}" />页</c:if>
<c:if test="${status.count==2}"><c:out value="${aValue}" />行</c:if>
<c:if test="${status.count==3}"><c:out value="${aValue}" />列</c:if>
</c:forTokens>
</td>

<td width="10%" class="main_matter_td">基础元素</td>
<td width="40%" align="left" class="main_matter_td">
<!--
<input name="classtype" id="classtype" type="text" class="textBox" value="${entity.classtype}" size="24" onblur="unamecheck();" />
-->
<select name="classtype" id="classtype" style="width: 150px;">
<c:forEach items="${list1}" var="listb" >
<option value="${listb.id}"
<c:if test="${listb.id==entity.classtype }">
selected="selected"
</c:if>
> ${listb.id}:${listb.name}</option>

</c:forEach>
</select>

</tr>
<tr
onmouseover="currentcolor=this.style.backgroundColor;this.style.backgroundColor='#f0f7ff'"
onmouseout="this.style.backgroundColor=currentcolor">
<td width="10%" class="main_matter_td">版本号</td>
<td width="40%" align="left" class="main_matter_td">
<!--
<input name="versionNum" id="versionNum" type="text" class="textBox" value="${entity.versionNum}" size="24" onblur="unamecheck();" />
-->
<select name="versionNum" id="versionNum" style="width: 150px;">
<c:forEach items="${list3}" var="listv" >
<option value="${listv}"
<c:if test="${listv==entity.versionNum }">
selected="selected"
</c:if>
>
<c:choose>
<c:when test="${listv=='0'}">
${listv}:一页模板
</c:when>
<c:when test="${listv=='1'}">
${listv}: 十页模板
</c:when>
<c:when test="${listv=='10'}">
${listv}:10年之后一页模板
</c:when>
<c:when test="${listv=='11'}">
${listv}:10年之后十页模板
</c:when>
<c:when test="${listv=='2'}">
${listv}:共3个sheet
</c:when>
<c:otherwise>
${listv}: 其他模板
</c:otherwise>
</c:choose>
</option>

</c:forEach>
</select>

<td width="10%" class="main_matter_td">顺序号</td>
<td width="40%" align="left" class="main_matter_td">
<input name="orderNum" id="orderNum" type="text" class="textBox" value="${entity.orderNum}" size="24" onblur="unamecheck();" />

</tr>
<tr
onmouseover="currentcolor=this.style.backgroundColor;this.style.backgroundColor='#f0f7ff'"
onmouseout="this.style.backgroundColor=currentcolor">
<td width="10%" class="main_matter_td">类别</td>
<td width="40%" align="left" class="main_matter_td">
<input name="type" id="type" type="text" class="textBox" value="${entity.type}" size="24" onblur="unamecheck();" />

</td>
<td width="10%" class="main_matter_td">校验方法</td>
<td width="40%" align="left" class="main_matter_td">
<!--
<input name="meth" id="meth" type="text" class="textBox" value="${entity.meth}" size="24" onblur="unamecheck();" />
-->
<select name="meth" id="meth" style="width: 150px;">
<c:forEach items="${list4}" var="listm" >
<option value="${listm}"
<c:if test="${listm==entity.meth }">
selected="selected"
</c:if>
>
<c:choose>
<c:when test="${listm==12}">
${listm}:校验单位名称和地址
</c:when>
<c:when test="${listm==13}">
${listm}:校验日期
</c:when>
<c:when test="${listm==14}">
${listm}:校验检字号
</c:when>
<c:when test="${listm==15}">
${listm}:校验检测号和采地点
</c:when>
<c:when test="${listm==16}">
${listm}:校验所有的监测值
</c:when>
<c:otherwise>
${listm}:非正常检测值
</c:otherwise>
</c:choose></option>
</c:forEach>
</select>

</td>
</tr>

<tr>
<td height="40" valign="top" class="main_matter_td">&nbsp;</td>
<td colspan="3" align="left" class="main_matter_td"><input type="image" name="imageField22222" src="../btn/btn_save.GIF" id="sub"/></td>
</tr>

</table>
<!--2end-->
</td>
<td width="8" background="../images/tab_15.gif">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td height="35" background="../images/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="35"><img src="../images/tab_18.gif" width="12" height="35" /></td>
<td>&nbsp;</td>
<td width="16"><img src="../images/tab_20.gif" width="16" height="35" /></td>
</tr>
</table></td>
</tr>
</table>
</form>
</body>
</html>

ACTION     ListEtlExtractPositionOfAll

/*
* 查询提取位置表所有数据
*
*/

public String ListEtlExtractPositionOfAll(){
// int code = Integer.parseInt(get("code").toString());
// this.getmenu(code, this.getRequest());
//
// String beid = get("wzxx")==null?"":get("wzxx").toString();
// StringBuffer path = new StringBuffer("ListEtlExtractPositionOfAll.action?code=");
// path.append(code);
// StringBuffer ql = new StringBuffer("1=1");
// if(beid!=""&&!"".equals(beid))
// {
// ql.append(" and positionNum like '%").append(beid).append("%'");
// //ql.append(" and beid lik '%").append(beid);
// }
// pageService.getPage(path.toString(), 0, this.getRequest());
// PageEntity entity = pageService.doList("Etlextractposition", ql.toString());
// getRequest().setAttribute("page", entity);
// return "success";

// h获取页面输入的查询条件字段
String str ="";
if(get("wzxx")!=null && !"".equals(get("wzxx"))){
// System.out.println("jinru");
// System.out.println("wzxx---->"+get("wzxx"));
str = " positionNum like '%"+get("wzxx")+"%'";
}
// System.out.println("".equals(get("wzxx")));
// System.out.println("wzxx---->no"+get("wzxx"));
// System.out.println("NOjinru");
// 接受数据库中传送的code
int code = Integer.parseInt(get("code").toString());
// System.out.println("code--->"+code);
this.getmenu(code, this.getRequest());
// 查询分页调用ACTION
pageService.getPage("ListEtlExtractPositionOfAll.action?code="+code, 0, this.getRequest());
// PageEntity entity = pageService.doList("Etlextractposition", "1=1");
PageEntity entity = pageService.doList("Etlextractposition", "".equals(str)?"1=1":str);
// 查询元素表 显示元素信息
List<Baseelement> list = new ArrayList<Baseelement>();
list = bscs.QueryAllBaseelement();
// 设置setAttribute 属性
this.getRequest().setAttribute("list", list);
this.getRequest().setAttribute("page", entity);
this.getRequest().setAttribute("code", code);
this.getRequest().setAttribute("wzxx", get("wzxx"));
return "success";
}

JSP  显示多条数据

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/share/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.STYLE1 {font-size: 12px}
.STYLE3 {font-size: 12px; font-weight: bold; }
.STYLE4 {
color: #03515d;
font-size: 12px;
}
-->
</style>

<script language=javascript>
function window.onload() {
if(top.location != self.location){
var a = window.parent.document.getElementsByTagName('iframe');

for (var i=0; i<a.length; i++){

if (a[i].name == self.name) {a[i].height = document.body.scrollHeight; return;}}}

}
</script>

<script>
var highlightcolor='#c1ebff';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var clickcolor='#51b2f6';
function changeto(){
source=event.srcElement;
if (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs = source.children;
//alert(cs.length);
if (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
cs[i].style.backgroundColor=highlightcolor;
}
}

function changeback(){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
cs[i].style.backgroundColor="";
}
}

function clickto(){
source=event.srcElement;
if (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs = source.children;
//alert(cs.length);
if (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
cs[i].style.backgroundColor="";
}
}
</script>
<script language="javascript">
function delconfirm(url){
if(confirm("确定要删除这条数据?")){
location.href(url);
}
}
</script>

</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" background="../images/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="30"><img src="../images/tab_03.gif" width="12" height="30" /></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%"><div align="center"><img src="../images/tb.gif" width="16" height="16" /></div></td>
<td width="95%" class="STYLE1"><span class="STYLE3">你当前的位置</span>:${menu}</td>
</tr>
</table></td>
<td width="54%"><table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td width="60"><table width="87%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="STYLE1"><div align="center">
</div></td>
</tr>
</table>
</td>
<td width="100"><table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="STYLE1"><div align="center"><img src="../images/22.gif" width="14" height="14" /></div></td>
<td class="STYLE1">
<div align="center">
<a href="#" onclick="parent.showPopWin('CheckAction/OpenAddEtlExtractPositionInfo.action?code=${code}',700,185,null)">新增位置</a>
</div>
</td>
</tr>
</table></td>
<td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="STYLE1"><div align="center"></div></td>
<td class="STYLE1"><div align="center"></div></td>
</tr>
</table></td>
<td width="52"><table width="88%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="STYLE1"><div align="center"></div></td>
<td class="STYLE1"><div align="center"></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="16"><img src="../images/tab_07.gif" width="16" height="30" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8" background="../images/tab_12.gif">&nbsp;</td>
<td>
<!--1start-->

<!--1end-->
<form action="../CheckAction/ListEtlExtractPositionOfAll.action" method="post" id="form" name="form">
<input type="hidden" name="code" value="${code}" />

<table width="100%" border="0"
cellspacing="0" rules="all" style="WIDTH: 100%; BORDER-COLLAPSE: collapse">
<tr
onmouseover="currentcolor=this.style.backgroundColor;this.style.backgroundColor='#f0f7ff'"
onmouseout="this.style.backgroundColor=currentcolor">
<td width="80" class="main_matter_td">位置信息</td>
<td width="160" align="left" class="main_matter_td">
<input name="wzxx" id="wzxx" type="text" class="textBox" value="${wzxx}" size="24"></td>

<!--
<input name="wzxx" id="beid" type="text" class="textBox" value="${root.beid}" size="24"></td>
<td width="80" align="left" class="main_matter_td">监测场所</td>
<td width="180" align="left" class="main_matter_td"><select name="bid" style="width: 120px;" >
<option value="">请选择</option>
<c:forEach items="${dic}" var="en">
<option value="${en.id}"
<c:if test="${en.id==root.bid}" >selected="selected" </c:if>
>${en.name}</option>
</c:forEach>
</select>
</td>
-->

<td align="left" class="main_matter_td"><input name="submit" type="submit" value="查询" src="../btn/btn_cx.gif">
<span id="123" class="STYLE1">注:支持模糊查询</span></td>

<!-- -->
<td width="60"><table width="87%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="STYLE1">
<div align="center">
<input type="checkbox" name="items" value="" id="items" onclick="if(this.checked==true) {checkAll('test'); } else { clearAll('test'); }"/>
</div></td>
<td class="STYLE1">
<div align="center">
<input type="button" value="删除" onclick="count('test');"/>
</div></td>
</tr>

</table></td>
<!-- -->
<td width="120"><a href="#" class="STYLE1" onclick="parent.showPopWin('WebEtl/help-tqwzb.jsp',800,440,null)">提取位置帮助</a></td>
</tr>

</table>
</form>
<!--2end-->
</td>
<td width="8" background="../images/tab_15.gif">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8" background="../images/tab_12.gif">&nbsp;</td>
<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6" onmouseover="changeto()" onmouseout="changeback()">
<tr>

<td width="3%" height="22" background="../images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">序号</span></div></td>
<td width="10%" height="22" background="../images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">ID</span></div></td>
<td width="10%" height="22" background="../images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">位置信息</span></div></td>
<td width="10%" height="22" background="../images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">基础元素</span></div></td>
<td width="10%" background="../images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">版本号 </span></div></td>
<td width="5%" height="22" background="../images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">顺序号</span></div></td>
<td width="10%" height="22" background="../images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">类别 </span></div></td>
<td width="10%" height="22" background="../images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">校验方法</span></div></td>
<td width="20%" height="22" background="../images/bg.gif" bgcolor="#FFFFFF" class="STYLE1"><div align="center">基本操作</div></td>
</tr>

<!-- 开始 -->

<c:forEach items="${page.list}" var="entity" varStatus="st">
<tr>

<td height="20" bgcolor="#FFFFFF" ><div align="center" class="STYLE1">
<div align="center">${st.count}</div>
</div>
</td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">${entity.id}</span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center">
<span class="STYLE1">
<!-- ${entity.positionNum} -->

<c:forTokens items="${entity.positionNum}" begin="0" step="1" delims="," var="aValue" varStatus="status">
<!-- ${aValue} -->

<c:if test="${status.count==1}"><c:out value="${aValue}" />页</c:if>
<c:if test="${status.count==2}"><c:out value="${aValue}" />行</c:if>
<c:if test="${status.count==3}"><c:out value="${aValue}" />列</c:if>
</c:forTokens>
</span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">

<c:forEach items="${list}" var="baseList" >
<c:if test="${baseList.id==entity.classtype }">${baseList.name}</c:if>
</c:forEach>

<!--
${entity.classtype}
<c:choose>
<c:when test="${entity.classtype==3}">
CO2
</c:when>
<c:when test="${entity.classtype==4}">
CO
</c:when>
<c:when test="${entity.classtype==5}">
可吸入颗粒物
</c:when>
<c:when test="${entity.classtype==6}">
温度
</c:when>
<c:when test="${entity.classtype==7}">
湿度
</c:when>
<c:when test="${entity.classtype==8}">
风速
</c:when>
<c:when test="${entity.classtype==9}">
照度
</c:when>
<c:when test="${entity.classtype==10}">
噪声
</c:when>
<c:otherwise>
商业能手
</c:otherwise>
</c:choose>
-->
</span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center">
<span class="STYLE1">
<!--${entity.versionNum} -->

<c:choose>
<c:when test="${entity.versionNum=='0'}">
一页模板
</c:when>
<c:when test="${entity.versionNum==1}">
十页模板
</c:when>
<c:when test="${entity.versionNum=='2'}">
:共3个sheet
</c:when>
<c:when test="${entity.versionNum=='10'}">
2010年之后一页模板
</c:when>
<c:when test="${entity.versionNum=='11'}">
2010年之后十页模板
</c:when>
<c:otherwise>
其他模板
</c:otherwise>
</c:choose>

</span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">

${entity.orderNum}
<!-- ${fn:substring(entity.orderNum, 2, 3)} -->

</span></div></td>

<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">${entity.type}</span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center">
<span class="STYLE1">
<!-- ${entity.meth} -->

<c:choose>
<c:when test="${entity.meth==12}">
校验单位名称和地址
</c:when>
<c:when test="${entity.meth==13}">
校验日期
</c:when>
<c:when test="${entity.meth==14}">
校验检字号
</c:when>
<c:when test="${entity.meth==15}">
校验检测号和采地点
</c:when>
<c:when test="${entity.meth==16}">
校验所有的监测值
</c:when>
<c:otherwise>
非正常检测值
</c:otherwise>
</c:choose>
</span></div></td>
<td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE4">
<input type="checkbox" name="test" value="${entity.id}"/>

<img src="../images/33.gif" width="16" height="16" />
<a href='#' onclick="parent.showPopWin('CheckAction/QueryExtractPositionById.action?id=${entity.id}&code=${code }',700,140,null)">详细</a>&nbsp;&nbsp;

<img src="../images/edt.gif" width="16" height="16" />
<a href='#' onclick="parent.showPopWin('CheckAction/OpenModifyExtractPositionById.action?id=${entity.id}&code=${code }',700,185,null)">修改</a>&nbsp;&nbsp;

<img src="../images/del.gif" width="16" height="16" />
<a href="#" onclick="delconfirm('CheckAction/DelEtlExtractPositionByID.action?id=${entity.id}&code=${code }');">删除</a>&nbsp;

</span></div></td>
</tr>
</c:forEach>
<!-- 结束 -->

</table></td>
<td width="8" background="../images/tab_15.gif">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td height="35" background="../images/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="35"><img src="../images/tab_18.gif" width="12" height="35" /></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="STYLE4"><div align="center">${page.info}</div></td>

</tr>
</table></td>
<td width="16"><img src="../images/tab_20.gif" width="16" height="35" /></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<script type="text/javascript">
function checkAll(name) {
var el = document.getElementsByTagName('input');
var len = el.length;
for(var i=0; i<len; i++) {
if((el[i].type=="checkbox") && (el[i].name==name)) {
el[i].checked = true;
}
}
}
function clearAll(name) {
var el = document.getElementsByTagName('input');
var len = el.length;
for(var i=0; i<len; i++) {
if((el[i].type=="checkbox") && (el[i].name==name)) {
el[i].checked = false;
}
}
}
function count(name) {
var arr = new Array();
var el = document.getElementsByName('test')
var len = el.length;
for(var i=0; i<len; i++) {
if((el[i].checked == true) && (el[i].name==name)) {
arr.push(el[i].value);
}
}
var val = null;
val = arr.join(',');
if((val == "")|| (val == null)){
alert("没有选中任何删除选项..")
}else{
if(confirm("确定删除所选中的数据吗?")){
window.location.href='CheckAction/DelEtlExtractPositionInfo1.action?ids='+val+'&code=' +${code };
}
}
}

</script>
<!--
<script language="javascript">
function delconfirm(url){
if(confirm("其他用到该场所的信息场所也会被删除,确定删除吗?")){
location.href(url);
}
}
</script>
-->

通过查询数据库中的数据匹配在页面上:(set单条数据属性是在页面上的显示与foreach的不同) 通过ID修改提取位置表信息的更多相关文章

  1. Hibernate 查询数据库中的数据

    1.Criteria介绍 Criteria与Session绑定,其生命周期跟随着Session结束而结束,使用Criteria时进行查询时,每次都要于执行时期动态建立物件,并加入各种查询条件,随着Se ...

  2. JDBC查询数据库中的数据

    只用JDBC技术查询表中的全部内容时,需要使用查询全部的SQL语句,把查询结果放到List集合中. package qddx.JDBC; import java.util.*; import java ...

  3. MySQL查询数据库中所有数据表的数据条数

    select table_name,table_rows from information_schema.tables where TABLE_SCHEMA = '数据库名称' order by ta ...

  4. oracle 查询数据库中 有数据的表

    select table_name from ALL_TABLES where TABLESPACE_NAME='xxx' and NUM_ROWS > 0 order by  table_na ...

  5. 怎样在C#中从数据库中读取数据(数据读取器)

    实现在C#中通过语句,查询数据库中的数据 SqlConnection con = null; //创建SqlConnection 的对象 try    //try里面放可能出现错误的代码        ...

  6. phpStudy3——往数据库中添加数据

    前言: 前边介绍了查询数据库的方法,这里介绍下往数据库中添加数据的方法. 项目需求: 用户在前端页面输入的用户名和手机号码,点击提交后后端判断手机号码是否已经存在.如果不存在,那么插入数据库到数据库, ...

  7. EasyUI动态显示后台数据库中的数据

    最近在完成一个项目,采用SSM框架搭建完成,前端使用EasyUI搭建页面: 其中涉及到一个查询显示功能:查询数据库中的数据,动态显示在页面之中,刚开始这部分十分有疑问,所以虚心向同学学习,现总结至博客 ...

  8. 在数据库中添加数据以后,使用Mybatis进行查询结果为空

    在数据库中添加数据以后,使用Mybatis进行查询结果为空,这是因为数据库中添加数据忘记commit的缘故.

  9. PDO 拿出來的 Float 數據跟数据库中的数据不匹配

    数据库中的价格字段是 float 类型的,在 Laravel 中取出会出现这样的情况 数据库:71.9 -> 程序打印:72.0 数据库:75.2 -> 程序打印:75.3 在另外一个测试 ...

随机推荐

  1. 五、PL/SQL循环、游标、函数和过程

    --PL/SQL基础知识学习 --一.PL/SQL语句块,基础语法格式 DECLARE --变量声明列表 info varchar(25); --变量声明 stu_unm integer := 15; ...

  2. 2016阿里校招python研发面试

    一面: 面:说说你们学校的主修课程. 学校开的全是尼玛java课,这个我是想了有一会的. 面:看你简历写了会jquery,来问你个简单的jquery问题 :jQuery支不支持css引入. 呵呵 面: ...

  3. 反编译sencha toucha打包的apk文件,修改应用名称支持中文以及去除应用标题栏

    一.去除安卓应用标题栏 sencha touch打包android安装包,去掉标题栏titlebar的简单方法 (有更复杂更好的方法,参看"二.利用反编译修改apk的应用名称为中文" ...

  4. 海战(洛谷 P1331)

    题目描述 在峰会期间,武装部队得处于高度戒备.警察将监视每一条大街,军队将保卫建筑物,领空将布满了F-2003飞机.此外,巡洋船只和舰队将被派去保护海岸线.不幸的是因为种种原因,国防海军部仅有很少的几 ...

  5. Codeforces936D. World of Tank

    $n \leq 1e9$,$n*2$的网格里有$m_1+m_2 \leq 1e6$个障碍物,现有一坦克从$(0,1)$出发要到$(n+1,1/2)$,他每秒可以换行(纵坐标1变2或2变1)也可以发炮弹 ...

  6. IP聚合 ---百度之星(与运算)

    Problem Description 当今世界,网络已经无处不在了,小度熊由于犯了错误,当上了度度公司的网络管理员,他手上有大量的 IP列表,小度熊想知道在某个固定的子网掩码下,有多少个网络地址.网 ...

  7. MySQL事务及Spring事务管理

    事务,是在数据库中用于保证数据正确性的一种机制,涉及到很多概念以及不同的情况,这里做一个总结 相关概念 事务四特性(ACID) 原子性(Atomicity,或称不可分割性):要么全部完成或者全部不完成 ...

  8. eclipse默认指定项目的编译器版本

    eclipse 提示 @Override must override a superclass method 问题解决 今天新换了一个Eclipse 版本: Build id: 20140224-06 ...

  9. Hexo搭建个人blog

    Hexo搭建 现在只想说心累... 前几天看了几个牛人的blog,感觉他们的风格很舒服,然后就发现了Hexo这个好东西!激动的想马上自己也弄一个,昨天晚上开始看资料特别是:潘柏信写了两篇 HEXO搭建 ...

  10. HNU 12834 Thread Tree

    递归输出即可了 #include<bits/stdc++.h> using namespace std; struct tree{     int dot;     string s; } ...