[ECSide] 初学ECSide如果不用spring框架的话 应该如何实现

JavaNose 2007-10-07
最近刚刚了解ECSide的强大功能
我按照fins的步骤 用了一下ECSide没成功 页面没有任何反映
总觉得fins大哥给的例子有些复杂 不容易推广
假如像eXtremeComponents官方给的demo的话 初学者也好入门
呵呵
我的水平也是太低了,,,用不大明白
pharaohsprince 2007-10-08
多用用就好了··不难的·
hijackwust 2007-10-11
只需要添加几个必要的jar 包,spring.jar,ecside.jar,common-*.jar standard.jar 就可以了。

<%@ page language="java" import="java.util.*,org.powerstone.ca.model.User"
contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://www.ecside.org" prefix="ec"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

<html>
<head>
<title>eXtremeTest</title>

<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/ecside/css/ecside_style.css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/ecside/js/prototype_mini.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/ecside/js/ecside_msg_utf8_cn.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/ecside/js/ecside.js"></script>

</head>
<%
//HashMap model =new HashMap();
java.util.List userLists = new java.util.ArrayList();
java.util.List userLists2 = new java.util.ArrayList();
java.util.List presidents = new java.util.ArrayList();
for (int i = 1; i < 21; i++) {
User user =new User();
user.setId(new Long(i));
user.setUserName("zzw"+i);
user.setEmail("hijackwust@163.com" +i);
user.setRealName("zzw"+i);
userLists.add(user);

User user2 =new User();
user2.setId(new Long(i));
user2.setUserName("zhuzhiwu"+i);
user2.setEmail("gun__007@163.com" +i);
user2.setRealName("zhuzhiwu"+i);
userLists2.add(user2);



java.util.Map president = new java.util.HashMap();
president.put("name", "George Washington " + i);
president.put("nickname", "Father of His Country " + i);
president.put("term", "1789-1797 " + i);
presidents.add(president);


}
//model.put("userLists",userLists);
request.setAttribute("pres", presidents);
request.setAttribute("userLists", userLists);
request.setAttribute("userLists2", userLists2);

%>

<body style="margin: 25px;">
<p style="font-family: Verdana; font-size: 14px;">
恭喜!! 你已经配置 eXtremeTable0 成功!
</p>
<ec:table items="pres" var="pre" retrieveRowsCallback="process"
action="${pageContext.request.contextPath}/testEcSide.jsp"
pageSizeList="10,50" rowsDisplayed="10" title="用户信息"
editable="true" sortable="true" filterable="true">
<ec:row>
<ec:column width="50" property="_0" title="序号" value="${GLOBALROWCOUNT}" />
<ec:column property="name" title="Name" />
<ec:column property="nickname" title="Nickname" />
<ec:column property="term" title="Term" />
</ec:row>
</ec:table>
<p style="font-family: Verdana; font-size: 14px;">
恭喜!! 你已经配置 eXtremeTable1 成功!
</p>
<ec:table items="userLists2" var="record2" retrieveRowsCallback="process"
action="${pageContext.request.contextPath}/testEcSide.jsp"
pageSizeList="10,50" rowsDisplayed="10" title="用户信息"
editable="true" sortable="true" filterable="true">
<ec:row>
<ec:column property="id" title="用户ID2" />
<ec:column property="userName" title="用户姓名2" />
<ec:column property="realName" title="真实姓名2" />
</ec:row>
</ec:table>

<p style="font-family: Verdana; font-size: 14px;">
恭喜!! 你已经配置 eXtremeTable2 成功!
</p>



<ec:table items="userLists" var="record" retrieveRowsCallback="process"
action="${pageContext.request.contextPath}/testEcSide.jsp"
pageSizeList="10,50" rowsDisplayed="10" title="用户信息"
editable="true" sortable="true" filterable="true">
<ec:row>
<ec:column property="id" title="用户ID1" />
<ec:column property="userName" title="用户姓名1" />
<ec:column property="realName" title="真实姓名1" />
</ec:row>
</ec:table>

</body>
</html>
hijackwust 2007-10-11
去掉后两个 ecside table ,一个页面不能显示多个 ecside table,对它简直无语。
JavaNose 2007-10-11
非常感谢  呵呵
xiaoxiang88888888 2007-10-12
在ec:table 加入一个tableId属性试试
设置列表的唯一标识,默认为"ec",当一个页面内有多个ECSIDE列表时,必须为每个列表指定不同的tableId
hijackwust 2007-10-13
试过了,成功,非常感谢xiaoxiang88888888。。
jiangshu 2009-11-05
我是初学者,我添加了包,怎么运行部起来呢,报错
Global site tag (gtag.js) - Google Analytics