📄 bindclass.jsp
字号:
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.glf.reportIE.commons.XmlUtils" %>
<!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>
<link href="./css/reportIE_form.css" rel="stylesheet" type="text/css" media="all" />
<link href="./css/reportIE_main.css" rel="stylesheet" type="text/css" media="all" />
<script language="JavaScript" type="text/javascript" src="js/listview.js"></script>
<script language="JavaScript" type="text/javascript" src="js/validateUtil.js"></script>
<script language="JavaScript" type="text/javascript">
function addBindClass(){
if(checkInputValueIsNull('className','【类名】')
&& checkInputValueIsNull('methodName','【方法名】')){
document.getElementById("base").action="bindClassAdd";
document.getElementById("base").submit();
}
}
function editBindClass(id,id2){
if(checkInputValueIsNull('className'+id2,'【类名】')
&& checkInputValueIsNull('methodName'+id2,'【方法名】')){
var tempStr = document.getElementById(id).value;
document.getElementById("base").action="bindClassEdit?only="+tempStr+"&id="+id2;
document.getElementById("base").submit();
}
}
function deleteBindClass(id,id2){
if(confirm('您确定要删除这条记录吗?')){
var tempStr = document.getElementById(id).value;
document.getElementById("base").action="bindClassDelete?only="+tempStr+"&id="+id2;
document.getElementById("base").submit();
}
}
</script>
</head>
<body>
<% String formName = request.getParameter("formName");%>
<h1>【后台参数设置】-【绑定java类到报表】</h1>
<form action="" method="post" name="base" id="base">
<div id="bigform">
<table width="89%" border="0" cellpadding="0" cellspacing="0">
<input type="hidden" name="hiddenFormName" id="hiddenFormName" value="<%=formName %>" />
<tbody id="dynamicArea">
<%
String xmlPath = request.getRealPath("")+"/pages/reportIE/xml/"+formName+".xml";
String xmlPathName = request.getRealPath("")+"/pages/reportIE/model/excelFormName.xml";
String formNameCn = XmlUtils.getOtherAttributeValue(xmlPathName,"formName","nameEn",formName,"name");
String tempAddStr = XmlUtils.getOtherAttributeValue(xmlPath,"bindClass","formName",formName,"className");
boolean flag = XmlUtils.fileIsExits(xmlPath);
int j = 0;
if(flag){
ArrayList cellList = XmlUtils.getBindClassValue(xmlPath);
for(int i=0;i<cellList.size();i++){
j++;
%>
<tr onmouseover="setPointer(this, '1', 'over', '#f5f5f5', '#ddecff', '');" onmouseout="setPointer(this, '1', 'out', '#f5f5f5', '#ddecff', '');" onmousedown="setPointer(this, '1', 'click', '#f5f5f5', '#ddecff', '');">
<td class="fm-label" bgcolor="" style="width:18%">
报表名
<input name="formNameCn<%=j%>" id="formNameCn<%=j%>" readonly="readonly" style="background-color: #D0D0D0;width: 85px;" type="text" value="<%=formNameCn%>" />
<input name="formName<%=j%>" id="formName<%=j%>" type="hidden" value="<%=cellList.get(i) %>" />
<input name="only<%=j%>" id="only<%=j%>" type="hidden" value="<%=cellList.get(i) %>" />
</td>
<td class="fm-label" style="width:36%">
类名
<input name="className<%=j%>" id="className<%=j%>" style="width: 235px;" type="text" value="<%=cellList.get(i+1) %>" />
<input name="classNameBase<%=j%>" id="classNameBase<%=j%>" type="hidden" value="<%=cellList.get(i+1) %>" />
</td>
<td class="fm-label" style="width:36%">
方法名
<input name="methodName<%=j%>" id="methodName<%=j%>" style="width: 235px;" type="text" value="<%=cellList.get(i+2) %>" />
<input name="methodNameBase<%=j%>" id="methodNameBase<%=j%>" type="hidden" value="<%=cellList.get(i+2) %>" />
</td>
<td class="fm-label" style="text-align:center" style="width:10%">
<a href="#" onclick="return editBindClass('only<%=j%>','<%=j%>')"><img src="images/icn_bt_edit.gif" title="修改" /></a>
<a href="#" onclick="return deleteBindClass('only<%=j%>','<%=j%>')"><img src="images/icn_bt_delete.gif" title="删除" /></a>
</td>
</tr>
<%
i+=2;
}
}
%>
<tr>
<td colspan="4">
<hr />
【绑定java类到报表】
<font color="green">在这里设置报表里用到的类和方法名。</font>
<hr />
</td>
</tr>
<tr style="height:5px"><td> </td></tr>
<tr id="newTR" style="display: none">
<td class="fm-label" style="width:18%">
报表名
<input name="formNameCn" id="formNameCn" readonly="readonly" style="background-color: #D0D0D0;width: 85px;" type="text" value="<%=formNameCn%>" />
<input name="formName" id="formName" type="hidden" value="<%=formName%>" />
</td>
<td class="fm-label" style="width:36%">
类名
<input name="className" id="className" style="width: 235px;" type="text" value="" />
</td>
<td class="fm-label" style="width:36%">
方法名
<input name="methodName" id="methodName" style="width: 235px;" type="text" value="" />
</td>
<td class="fm-label" style="text-align:center" style="width:10%">
<a href="#" onclick="return addBindClass()"><img src="images/icn_bt_new.gif" title="新增" /></a>
</td>
</tr>
</tbody>
</table>
</div>
<div id="bigformbt">
<input name="button" class="fm-reset" value="上一步" type="button" onclick="location.href='chooseBindClass.jsp'" />
<%if(tempAddStr.equals("") && tempAddStr.length()==0){%>
<input name="addResult" class="fm-submit" value="添加输入栏" type="button" onclick="document.getElementById('errormessage').style.display='none';document.getElementById('newTR').style.display=''" />
<%}%>
</div>
<br />
<%
String errorMessage = (String)request.getAttribute("errorMessage");
if(errorMessage != null && errorMessage.length() > 0)
{
%>
<div id="errormessage">
<h4>请注意</h4>
<div id="warning">
<form>
<fieldset>
<div>
<table border="0" width="100%">
<tr>
<td width="25"><img src="./images/icn_warning_m.gif" align="top" /></td>
<td>
<label >
<span class="tips" id="error" style="color:red" >
<%=errorMessage%>
</span>
</label>
</td>
</tr>
</table>
</div>
</fieldset>
<div id="warningbt"></div>
</form>
</div>
</div>
<%}else{%>
<div id="errormessage"></div>
<%} %>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -