JSP页面
<tr>
<td class="STYLE1">
<div align="center">
// 单击事件 调用方法
<input type="image" id="imageField22222" name="imageField22222" src="../btn/btn_cx.gif" id="sub" οnclick="queryAllEqu();"/>
</div>
</td>
</tr>
<script language="javascript">
// 用于提交 ACTION
function queryAllEqu(){
document.form.submit();
}
</script>
// 这里写出调用的ACTION 及传送方式
<form action="QueryEquApplianceAllInfo.action" name="form" method="post">
// 这里是写出隐藏域 用来传递code的参数
<input type="hidden" name="code" value="${code }"/>
/** EquAppliance 方法开始
* @author MGX
* @return
* @ 查看设备所有信息
*/
public String QueryEquApplianceAllInfo(){
Integer code=Integer.parseInt(this.get("code").toString().trim());
this.getmenu(code, this.getRequest());
String str1 = "";
if(get("text1") != null && !"".equals(get("text1"))){
str1 = " appliname like '%" + get("text1").toString() + "%'";
}
if(get("text2") != null && !"".equals(get("text2"))){
if("".equals(str1)){
str1 += " applicode like '%" + get("text2").toString() + "%'";
}else{
str1 += " and applicode like '%" + get("text2").toString() + "%'";
}
}
pageService.getPage("QueryEquApplianceAllInfo.action?code="+code, 0, this.getRequest());
PageEntity entity = pageService.doList("EquAppliance", "".equals(str1) ? "1=1" : str1);
this.getRequest().setAttribute("page", entity);
this.getRequest().setAttribute("text1", get("text1"));
this.getRequest().setAttribute("text2", get("text2"));
return "success";
// Integer code=Integer.parseInt(this.get("code").toString().trim());
// this.getmenu(code, this.getRequest());
// pageService.getPage("QueryEquApplianceAllInfo.action?code="+code, 0, this.getRequest());
// PageEntity entity = pageService.doList("EquAppliance", "1=1");
// this.getRequest().setAttribute("page", entity);
// return "success";
}