分页 eXtremeTable 使用

http://code.google.com/p/extremetable/wiki/Setup

http://www.cnblogs.com/sharewind/archive/2007/04/18/717764.html

本人认为eXtremeTable 比displayTag功能更强大。
The eXtremeTable is a JSP custom tag library used to display data in a table format.

1.eXtremeTable本质上是一个form组件,所以我假定表被包在form里,所有的功能都被认为是对form元素的操作。如果你想在表体中包含一些定制的form元素, 或者想将eXtremeTable嵌入到另外的form中,那么你就要使用表标签的form属性用来参照最近的form。

如果您不特意指定form属性,eXtremeTable自动在表附近包上一个form。所有表的动作例如:排序、过滤、分页将自动给一些隐藏的input元素赋值,然后提交这个form到表标签action属性设置的Aciton。 这非常有效,除非您想要将自己的form元素设置到表体,或者想将这个表放到别的form里。
2.
<ec:table
        items="pres"
        action="${pageContext.request.contextPath}/test.jsp"
        imagePath="${pageContext.request.contextPath}/images/table/*.gif"
        title="Presidents"
        width="100%"
        rowsDisplayed="5"
        var="aa"
        locale="zh_CN"
        filterable="false"
sortable="false"
        >
          <ec:exportPdf
    fileName="presidents.pdf"
    tooltip="Export PDF"
    headerColor="blue"
    headerBackgroundColor="red"
    headerTitle="Presidents"/>
    <ec:exportXls
            fileName="中文.xls"
            tooltip="Export Excel"
            text="XLS"
            />
        <ec:row>
            <ec:column property="name"  title="姓名" filterable="false" sortable="false"/>
            <ec:column property="nickname" filterable="false" sortable="false"/>
            <ec:column property="term" filterable="false" sortable="false">
      <a href="http://www.baidu.com/s?wd=${pageScope.aa.term}">${pageScope.aa.term}</a>

    </ec:column>

        </ec:row>
    </ec:table>


注意: a. filterable="false"表示是否出现有过滤的文本框
b.sortable="false"是否对这列进行排序。 如果放在table后就是针对整个表而来说,是否过滤或排序。默认的都为true
c.<a href="http://www.baidu.com/s?wd=${pageScope.aa.term}">${pageScope.aa.term}</a>
对于某一列中数据加链拉。

存在的问题:导出pdf时中文乱码????
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值