extremeComponents Table组件快速使用方法
1、在/WEB-INF/tld/下拷贝入extremecomponents.tld文件
2、项目中加入extremecomponents-1.0.1.jar文件(拷入/WEB-INF/lib/目录)
3、web.xml加入:
<
jsp-config
>
< taglib >
< taglib-uri > /WEB-INF/tld/extremecomponents.tld </ taglib-uri >
< taglib-location > /WEB-INF/tld/extremecomponents.tld </ taglib-location >
</ taglib >
< taglib >
< taglib-uri > /WEB-INF/tld/c.tld </ taglib-uri >
< taglib-location > /WEB-INF/tld/c.tld </ taglib-location >
</ taglib >
</ jsp-config >
< taglib >
< taglib-uri > /WEB-INF/tld/extremecomponents.tld </ taglib-uri >
< taglib-location > /WEB-INF/tld/extremecomponents.tld </ taglib-location >
</ taglib >
< taglib >
< taglib-uri > /WEB-INF/tld/c.tld </ taglib-uri >
< taglib-location > /WEB-INF/tld/c.tld </ taglib-location >
</ taglib >
</ jsp-config >
4、jsp页代码:
<
%@ page
language
="java"
pageEncoding
="GB2312"
%
>
< %@ taglib uri ="/WEB-INF/tld/extremecomponents.tld" prefix ="ex" % >
< %@ taglib uri ="/WEB-INF/tld/c.tld" prefix ="c" % >
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
< html >
< head >
< title > ResourceList.jsp </ title >
< meta http-equiv ="pragma" content ="no-cache" >
< meta http-equiv ="cache-control" content ="no-cache" >
< meta http-equiv ="expires" content ="0" >
< meta http-equiv ="keywords" content ="keyword1,keyword2,keyword3" >
< meta http-equiv ="description" content ="This is my page" >
< link rel ="stylesheet" type ="text/css" href ="<c:url value=" /css/extable.css" /> "/>
< script type ="text/javascript" src ="<c:url value=" /script/extable.js" /> "/>
</ head >
< body >
< h1 > 资源列表 </ h1 >
< ex:table
items ="resources" //从request.getAttribute("resources")中获得
action ="${pageContext.request.contextPath}/action/manager/usermanager/resourceList" //会在排序筛选时使用到
imagePath ="${pageContext.request.contextPath}/images/table/*.gif "
title ="资源"
width ="90%"
rowsDisplayed ="10" //每页显示行数
filterable ="false" //是否使用过滤
>
< ex:row highlightRow ="true" >
< ex:column property ="id" title ="标识" /> //列(字段)名称(首字母小写)
< ex:column property ="name" title ="名称" />
< ex:column property ="resType" title ="资源类型" />
< ex:column property ="resString" title ="资源字符串" />
< ex:column property ="descn" title ="描述" />
</ ex:row >
</ ex:table >
</ body >
</ html >
< %@ taglib uri ="/WEB-INF/tld/extremecomponents.tld" prefix ="ex" % >
< %@ taglib uri ="/WEB-INF/tld/c.tld" prefix ="c" % >
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
< html >
< head >
< title > ResourceList.jsp </ title >
< meta http-equiv ="pragma" content ="no-cache" >
< meta http-equiv ="cache-control" content ="no-cache" >
< meta http-equiv ="expires" content ="0" >
< meta http-equiv ="keywords" content ="keyword1,keyword2,keyword3" >
< meta http-equiv ="description" content ="This is my page" >
< link rel ="stylesheet" type ="text/css" href ="<c:url value=" /css/extable.css" /> "/>
< script type ="text/javascript" src ="<c:url value=" /script/extable.js" /> "/>
</ head >
< body >
< h1 > 资源列表 </ h1 >
< ex:table
items ="resources" //从request.getAttribute("resources")中获得
action ="${pageContext.request.contextPath}/action/manager/usermanager/resourceList" //会在排序筛选时使用到
imagePath ="${pageContext.request.contextPath}/images/table/*.gif "
title ="资源"
width ="90%"
rowsDisplayed ="10" //每页显示行数
filterable ="false" //是否使用过滤
>
< ex:row highlightRow ="true" >
< ex:column property ="id" title ="标识" /> //列(字段)名称(首字母小写)
< ex:column property ="name" title ="名称" />
< ex:column property ="resType" title ="资源类型" />
< ex:column property ="resString" title ="资源字符串" />
< ex:column property ="descn" title ="描述" />
</ ex:row >
</ ex:table >
</ body >
</ html >