[ECSide] 为什么我的ecside无法正常运行却不报错呢?
vkuang
2007-04-14
总是说没有找到记录.控制台提示
You need to specify the totalRows (as an Integer) to use the org.ecside.table.callback.CommonLimitCallback. 有人帮我看下吗? ------------------ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName"> <value>com.mysql.jdbc.Driver</value> </property> <property name="url"> <value>jdbc:mysql://localhost:3306/studb</value> </property> <property name="username"> <value>root</value> </property> <property name="password"> <value>77hbc</value> </property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="dataSource" /> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.MySQLDialect </prop> </props> </property> </bean> <bean id="Userlist" class="org.ecside.easylist.DefaultEasyListModel"> <property name="dataSource"> <ref bean="dataSource" /> </property> <property name="defaultPageSize"> <value>10</value> </property> <property name="sqlSelect"> <value>select stu_id,stu_name,stu_pwd from student</value> </property> </bean></beans> ----------------------------------------- show.jsp <meta http-equiv="MSThemeCompatible" content="no" /> <link rel="stylesheet" type="text/css" href="<%=basePath%>/common/css/td_style_ec.css" /> <script type="text/javascript" src="<%=basePath%>/common/js/prototypeajax.js" ></script> <script type="text/javascript" src="<%=basePath%>/common/js/ecside.js" ></script> <script type="text/javascript" > function init(){ var ecside1=new ECSide("${ecTableId}"); ecside1.init(); } </script> </head> <body style="padding:10px;" onload="init()"> This is my JSP page. <br> <ec:table tableId="${ecTableId}" items="recordList" var="record" title="USER_INFO" xlsFileName="USER_INFO.xls" resizeColWidth="true" width="100%" action="${pageContext.request.contextPath}/show.jsp?easyList=Userlist" title="用户列表" showPrint="true" xlsFileName="用户列表.xls" nearPageNum="0" resizeColWidth="true" width="100%" listWidth="320" > <ec:row > <ec:column width="80" property="stu_id" title="序号"/> <ec:column width="120" property="stu_name" title="用户名" /> <ec:column width="120" property="stu_pwd" title="密码" /> </ec:row> </ec:table> --------------------------------------- 数据库 CREATE TABLE `student` ( `stu_id` int(11) NOT NULL auto_increment, `stu_name` varchar(40) default NULL, `stu_pwd` varchar(40) default NULL, PRIMARY KEY (`stu_id`) ) ENGINE=InnoDB DEFAULT CHARSET=gbk; |
|
caryl
2007-04-14
在request中setAtrribute("totalRows",记录总行数)
|
|
vkuang
2007-04-16
setAtrribute("totalRows",记录总行数)以后显示
共5条记录,显示1到5 控制台没有显示,但是记录还是读不出来 |