解决display tag导出execle中文乱码问题 jar包

解决display tag导出execle中文乱码问题 jar包

 

直接放到工程lib下即可

 

displaytag_zh_CN.properties 解决display页面显示为中文 放到classess下即可

 

注意:先下载iTextAsian.jar包,放到/lib下

 

=========================================================================

附加 收集的dis使用说明 1.0的哦:

 

简要说明

1.  已知条件:

1 )存在一个 JavaBean : Computer(id , mainboard , cpu , keyboard , mouse , buyTime)

2 )存在一个 Collection( 包含五条 Computer 记录 ) : computer

       3 ) request 存放该 Collection : request.setAttribute(“test” , computer) ;

      

2.  将 Collection 里的记录生成一张表

代码: <display : table  name=”test”/>

说明:该表中包含以 test 命名的 Collection 的五条记录,显示的列为该 Computer

类的所有属性。

 

3.  有选择的显示列

代码:

<display : table  name=”test” >

               <display : column  property=”id” title=”ID” />

               <display : column  property=”mainboard” />

               <display : column  property=”cpu” />

               <display : column  property=”buyTime” />

      </display : table>

说明: property :代表要显示的列,若不指定 title 则列名默认为 property 指定的属性名。

     也可以增加其它自定义列,例如:

<display:column title=" 操作 "> 删 除 </display:column>

 

4.  指定以某列值进行排序

代码:

<display : table  name=”test” defaultsort="1" defaultorder="descending" >

               <display : column  property=”id” title=”ID”  sortable="true"/>

               <display : column  property=”mainboard” />

               <display : column  property=”cpu” />

               <display : column  property=”buyTime”  sortable="true"/>

      </display : table>

 

说明: defaultsort : 在还未点击可排序列时的默认状态

      defaultorder :指明默认是升序还是降序进行排序( ascending /descending )

      sortable :在要进行排序的列上指明该属性为 true ,则每点击一次该列都会以升序或降序进行表格重排。

 

5.  创建动态连接

代码:

<display : table  name=”test” >

     <display : column  property=”id” title=”ID” href=”details.jsp” paramId=”id” />

     <display : column  property=”mainboard”  href=”details.jsp”                                                 paramId=”action”  paramName=”testparam” />

     <display : column  property=”cpu”  href=”details.jsp” paramId=”id”

paramScope =”request” paramProperty=”id”/>

  <display : column  property=”buyTime”  />

</display : table>

说明:

href : the base URL used to construct the dynamic link

paramId: the name of the parameter that gets added to the URL specified above

paramName: name of the bean that contains the data we want to tack on the the URL

(typically null, indicating the current object in the List)

paramProperty: property to call on the object specified above to return the value that

                      gets tacked onto the URL.

paramScope: specific scope where the databean lives, typically null

 

 

6.  翻页功能 ( 每页显示 2 条记录 )

<display : table  name=” test” pagesize ="2" />

 

7.  表头、表尾说明

表头: <display : caption>this is a table caption</display : caption>

 

表尾:

<display:footer>

     <tr>

        <td colspan="3">sample footer</td>

        <td>any sum or custom code can go here</td>

     </tr>

</display:footer>

 

8.  列表所处范围

pageScope

requestScope ( 默认 ) ,前面所介绍的 test 都是从 request 中取出。

sessionScope

applicationScope

例:从 sessionScope 中取出列表 test2

               <display : table name=” sessionScope.test2”/>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值