为何总是显示不出数据?

daiing 2007-03-29
<%@ page language="java" contentType="text/html;charset=GBK" %>
<%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
<%
String webapp=request.getContextPath();
%>
<%
java.util.List presidents = new java.util.ArrayList();

for(int i = 0;i < 3;i++) {
java.util.Map president = new java.util.HashMap();
president.put("name","aaa" + "_" + i);
president.put("nickname","Father of His Country" + "_" + i);
president.put("term","1789-1797");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","bbb" + "_" + i);
president.put("nickname","Atlas of Independence" + "_" + i);
president.put("term","1797-1801");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","Thomas Jefferson" + "_" + i);
president.put("nickname","Man of the People, Sage of Monticello" + "_"
+ i);
president.put("term","1801-09");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","James Madison" + "_" + i);
president.put("nickname","Father of the Constitution" + "_" + i);
president.put("term","1809-17");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","James Monroe" + "_" + i);
president.put("nickname",
"The Last Cocked Hat, Era-of-Good-Feelings President" + "_" + i);
president.put("term","1817-25");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

president = new java.util.HashMap();
president.put("name","John Adams");
president.put("nickname","Old Man Eloquent" + "_" + i);
president.put("term","1825-29");
president.put("no","" + i);
president.put("no2","2" + i);
presidents.add(president);

}

request.setAttribute("pres",presidents);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title>ECSide Demo</title>
<meta http-equiv="MSThemeCompatible" content="no" />
<link rel="stylesheet" type="text/css" href="<%=webapp%>/common/css/td_style_ec.css" />
<script type="text/javascript" src="<%=webapp%>/common/js/prototypeajax.js" ></script>
<script type="text/javascript"  src="<%=webapp%>/common/js/ecside.js" ></script>
<script type="text/javascript" >
function init(){
var ecside1=new ECSide("ec");
ecside1.init();
}
</script>
</head>

<body style="padding:20px;padding-left:20px" onload="init()">

<ec:table tableId="ec" items="pres" action="" title="用户列表" showPrint="true" xlsFileName="用户列表.xls"
nearPageNum="0"  resizeColWidth="true"
width="100%" listWidth="780" >
<ec:row >
<ec:column width="80" property="_0" title="序号"  value="${GLOBALROWCOUNT}" />
</ec:row>
</ec:table>

</body>

</html>

已经删的最干净了就一个序号,还是显示没有找到记录,日志里说
2007-3-29 15:16:41 org.ecside.common.log.LogHandler warnLog
警告: You need to specify the totalRows (as an Integer) to use the org.ecside.table.callback.CommonLimitCallback.
fins 2007-03-29
加上这个属性就可以了

<ec:table retrieveRowsCallback="process" ...
daiing 2007-03-30
能不能写在配置文件里,我看demo的配置文件和message文件都注释掉了,能去掉注释,在外面配置嘛?
fins 2007-03-30
可以的 你可以在web.xml里指定自己的配置文件
daiing 2007-03-30
我在配置文件中写retrieveRowsCallback=process完全没有作用,难道每页都要重复写一下?
fins 2007-03-30
不用 在配置文件中
现在是:
table.filterRowsCallback.default=org.ecside.table.callback.CommonLimitCallback

你改成
table.filterRowsCallback.default=org.extremecomponents.table.callback.ProcessRowsCallback
lily123 2008-07-30
我也出现了上面的问题,按照方法改了,不报错了,可是数据还是没有显示??
Global site tag (gtag.js) - Google Analytics