知道ECSide有段时间了,但一直都没尝试使用。最近在尝试使用,但发现一个很不解的疑问。在用ECSide进行翻页,排序等操作试,action会被多次执行。action里调用DAO从取LIST的方法也被执行。这样每操作一次(翻页,或排序等),action就被执行一次,List也被从新取了一次,导致响应很慢。
JSP里的代码
xml 代码
- <link rel="stylesheet" type="text/css" href="<%=webapp%>/ecside/css/ecside_style.css" />
- <script type="text/javascript" src="<%=webapp%>/ecside/js/prototype_mini.js" ></script>
- <script type="text/javascript" src="<%=webapp%>/ecside/js/ecside_msg_utf8_cn.js"></script>
- <script type="text/javascript" src="<%=webapp%>/ecside/js/ecside.js" ></script>
- </head>
- <body>
- <ec:table items="users" var="user" retrieveRowsCallback="process"
- sortable="true" action="${pageContext.request.contextPath}/ShowUserList.do"
- rowsDisplayed="5" title="任务信息" width="80%" pageSizeList="2,5,10,50">
- <ec:row>
- <ec:column width="20" property="_0" title="序号" value="${GLOBALROWCOUNT}"/>
- <ec:column width="150" property="userid" title="用户ID" />
- <ec:column width="150" property="realname" title="用户姓名"/>
- <ec:column width="150" property="dwid" title="单位ID"/>
- </ec:row>
- </ec:table>
(我试着将ec:table 里的action属性设为显示该列表的JSP页面“userlist.jsp”,这样的话第一次打开页面是正常的,一但对列表经行任何错作,翻页,排序等,列表就变空了,右下脚纪录信息栏显示无任何纪录)
action里的主要代码
java 代码
- public ActionForward ShowUserkList(ActionMapping mapping, ActionForm form,
- HttpServletRequest request, HttpServletResponse response) {
- List userlist = new UserDAO().findAllUser();
- request.setAttribute("users", userlist);
- return mapping.findForward("success");
- }
不知道大家出现这种问题没?如何解决的????
分享到:
相关推荐
纯struts带标签纯struts带标签
StrutsMenu使用笔记StrutsMenu使用笔记StrutsMenu使用笔记StrutsMenu使用笔记StrutsMenu使用笔记StrutsMenu使用笔记StrutsMenu使用笔记StrutsMenu使用笔记
struts taglib使用示例 struts taglib使用示例 struts taglib使用示例struts taglib使用示例 struts taglib使用示例
struts2标签使用例子 struts2标签使用例子 struts2标签使用例子struts2标签使用例子
大三学习struts2后纯struts2做的通讯录 数据库源码统统唷
struts下使用dwr,解压后放到web引擎中即可看到
我希望能够得到大家的支持,交流,共进,所以不要大家的分数, ecside+struts2+spring2.5+hibernate3.2+mysql
struts标签使用中文说明文档 struts标签使用中文说明文档struts标签使用中文说明文档
struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别struts1和struts2的区别...
在struts2中使用freemarker模版.doc
关于Struts2的使用详情,以及绝对路径和相对路径的使用
struts2 使用注解现在零配置不需要在使用struts.xml配置文件。 struts2 注解实例。可以直接跑
纯Struts2环境搭建 包的准备 ECLIPSE准备 ECLIPSE配置 WEB.XML struts.xml
struts2使用手册
struts2标签使用方法
myeclipse和struts配置使用
Struts2初步使用总结 初步介绍Struts2和用法
struts例子struts例子struts例子struts例子struts例子struts例子struts例子struts例子struts例子struts例子struts例子struts例子struts例子struts例子struts例子
struts标签库里面包括struts所有的标签使用源码