??xml version="1.0" encoding="utf-8" standalone="yes"?>久久被窝电影亚洲爽爽爽,亚洲AV日韩精品久久久久,久久久久亚洲精品无码网址http://m.tkk7.com/libin2722/category/29914.html虚其心,可解天下之问Q专其心Q可d下之学;静其心,可悟天下之理Q恒其心Q可成天下之业?/description>zh-cnThu, 06 Mar 2008 08:00:52 GMTThu, 06 Mar 2008 08:00:52 GMT60Extremecomponents http://m.tkk7.com/libin2722/archive/2008/03/06/184231.htmlC物C物Thu, 06 Mar 2008 04:48:00 GMThttp://m.tkk7.com/libin2722/archive/2008/03/06/184231.htmlhttp://m.tkk7.com/libin2722/comments/184231.htmlhttp://m.tkk7.com/libin2722/archive/2008/03/06/184231.html#Feedback0http://m.tkk7.com/libin2722/comments/commentRss/184231.htmlhttp://m.tkk7.com/libin2722/services/trackbacks/184231.html

0.概述

    Home Page:http://www.extremecomponents.org

     Extreme Table是最功能强大而又Ҏ配置,扩展,自定义的Table 控g?/p>

     最紧要的功能包括排? 分页, 导出Excel, pdf和汇怅R?/p>

     springside的best CZ代码? listBook.jsp和listOrder.jsp.

基础ȝ: 

     1. ExtremeTable自带的文?/a> .

     2.Luck译的ExtremeTable官方文中文?/a>   

1. 安装

1.1 安装原始版本

     1. ?a >http://www.extremecomponents.org 下蝲最新版

     2.把extremecomponents.jar 攑օweb-inf/lib

     3.Ҏminum, 导出excel ?导出pdf的需要,?lib下的jar copy到web-inf/lib

     4.把images里的囄攑օweb的Q意目?/p>

     5.把css文g攑ֈweb的Q意目?/p>

     6.?source/org/extremecomponents/table/core目录扑ֈextremetable.properties文g,把它复制到WEB-INF/classes里面q进行修?

     7.修改web.xml (?)?/p>

 0.2 复制SpringSide的样?/h3>

     1.Copy springside的Table Head的图Q查?/p>

     2.springside中的修改版extremecomponents.css文g攑օL目录

     3.?src/resource/extremetable.properties 复制到对应目?/p>

0.3 使用Compact View很重?/h3>

     默认的式样不W合大家的审,q怺q有Compact View和css讄Q让我们可以敬谢不敏它号U非常方便的HtmlView子类扩展?/p>

    1. 在全局讄?/p>

table.view.html=org.extremecomponents.table.view.CompactView

    2.把images?table/compact/*.gif copy ?/table

2.全局属性配|?/h2>

   ExtremeTable支持在properties文g里方便的l一配置丰富的全局属?/p>

  ?source/org/extremecomponents/table/core目录扑ֈextremetable.properties文g,把它复制到WEB-INF/classes里面.

 在web.xml里面增加

   <context-param>
        <param-name>extremecomponentsPreferencesLocation</param-name>
        <param-value>/extremetable.properties</param-value>
   </context-param>

一般只写需要修改的文g:

table.filterable=false
table.imagePath=/images/table/*.gif
table.locale=zh_CN
table.view.html=org.extremecomponents.table.view.CompactView
row.highlightRow=true
column.format.date=yyyy-MM-dd
column.format.currency=###,###,###,###,#00.00

3.导出Excel

    注意Excel 导出的Tag已改为,且官方版不支持中文文件名?/p>

    <ec:exportXls fileName="BookList.xls" tooltip="导出 Excel"/>

在web.xml必须加入Q?/p>

    <filter>
        <filter-name>eXtremeExport</filter-name>
        <filter-class>org.extremecomponents.table.filter.ExportFilter</filter-class>
    </filter>
<filter-mapping>
        <filter-name>eXtremeExport</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

     ExtremeTable导出的一w要特性是可以Ҏ不同的View导出不同的列.

     比如html理界面可能只列单几个最重要的列Q而导出excel时则需要导出所有的列?/p>

<ec:column property="orderdate" title="订单日期"  cell="date" format="yyyy-MM-dd"  viewsDenied= "html"/>

又比如有些操作按U的列只惛_html出现,excel里不惛_玎ͼ

<ec:column property="orderdate" title="订单日期" viewAllowed= "html"/>

     以上订单日期列在html view看不刎ͼ而excel,pdf view可以见到.

    ?~辑图标"Q?选择Checkbox"q些理界面上的列,也可以设|不export到pdf,excel view

4.其他要点

4.1. 使用排序功能?如果property为嵌套属性时,需要设|alias

          因ؓjavascript的关p?

<ec:column property="customer.name" title="客户名称" alias="customer"/>

4.2. Date Cell与NumberCell 和RowCountCell

     在全局属性定?

 

 column.format.date= yyyy-MM-dd
column.format.currency= K?##,###,#00.00
<ec:column property="totalprice" title="总金? cell="currency" width="80" />
<ec:column property="shipdate" title="发货日期"  cell="date" width= "80"/>
<e

其中RowCountCell用于昄序号?/p>

4.3. 汇?/h3>

在column中加入两个cac属性,׃自动在table的底端显C汇?/p>

 

<ec:column property="totalprice" title="总金? cell="number" format="###,###,##0.00" calc="total" calcTitle= "汇?"/>

4.4 i18N

在Web.xml里面指定i18N的Properties文g

<context-param>
  <param-name>extremecomponentsMessagesLocation</param-name>
  <param-value>messages</param-value>
</context-param>
<ec:column property="name" title="book.name"/>

4.5数据库分?/h3>

 EC默认从数据库中查找所有记录然后由它来分页Q如果查询结果较大,可以考虑使用数据库端分页的方案?/p>

 此时QEC会用Limit对象向Controller传递PageNo,PageSize,OrderBy{分信息。而服务端向ECq回总记录数和当前页的内容,具体请参?BookController?/p>

4.6不显C导出excel及分?/h3>

最快的方式是设|table的showStatusBar= false

<ec:table  items= "order.orderItems"var="item" action=""   showStatusBar= "false">

    4.7ImagePath

  旧版EC包括其文都在每个table tag里定义ImagePath, 新版已经可以自动插入ContextPath,只需在properties文g定义table.imagePath=/images/table/*.gif卛_

5.自定义及扩展

   ExtremeTable比Display Tag的i一个就是良好的自定义和扩展能力Q不用千Z面?br />    不过QhL懒的Q虽然扩展子cdҎQ但能不扩展p是不可扩展了。幸亏用Compact View再改改CSS一般就能达到要求?/p>

 5.1. 良好的CSS定义

         ExtremeTable 的CSS定义非常严}, q且提供很多个层ơ的修改方式:

         1.直接修改css文g, 可以把table viewҎL样式

         2.修改全局属? 改变某种元素对应的css class?/p>

table.styleClass=tableRegion

         3.在某个页面的row,column tag中定义class

 <ec:row style="" or styleClass=""/>

        SpringSide采用层次1, 直接修改extremecomponents.css为合适的样式

5.2方便?lt;tr><td>属性扩?/h3>

        row与column已提供了丰富的普通属性与 javascript属性如onClick(), 如果属性仍然未?可自行扩?lt;row>?lt;column>tag Qƈ通过全局属性指定新的子cd?/p>

   Z方便大家在子cL展属? extreme Table提供了专门的回调函数与Util函数?/p>

public void addColumnAttributes(Column column) {
column.addAttribute("customAttributeOne", customAttributeOne);
}

详细L手册,Table, Row,Column都提供相同的扩展:
http://extremecomponents.org/wiki/index.php/Column#Extended_Attributes

如果不是Extremetable的特别支? 普通taglib class要扩展属性的?
        1.定义真正的Java属?setter,getter
        2. tld文g中声明新的属?
        3.重蝲输出函数新属性打印出?/p>

5.3 扩展HTMLView,cell {显C组?/h3>

     Extreme Table在这些类的扩展上放便很多Q但q个版本里我q没有进行尝试,׃写了。请自行参考官Ҏ?http://extremecomponents.org/wiki/index.php/Html_View_Tutorial .

http://www.springside.org.cn/docs/reference/ExtremeTable.htm



C物 2008-03-06 12:48 发表评论
]]> վ֩ģ壺 ޳xxxxxӰ| ޾Ʒɫ| 99ƷƵ| պƷר | ŮŮŮͬvideo| ҹþþþ| һëƬѲ| þþþóƬѹۿѿ| ޼ɫС˵| MM1313޾Ʒþ| ҹӰԺѹۿ| þþþAvƬv| պҹTVӰԺ| ޳avƬ| ëƬר| ߹ۿ鶹91Ʒ | þþƷ˽ӰԺѿ| Ʒѹһ| þ޾Ʒۺ| 99þ޾Ʒһ| һƵ| һ| ɫavһ| 㽶AVվ߹ۿ| þþƷƷ| һ| Ƭ߹ۿѹۿȫһ | ȫ»ɫؼվ| ɫͼ| ѻɫappվ| j8ֳִӲˬƵ| ھƷ߹ۿ| ҹɫ˽ӰԺ߹ۿ| ޹뾫ƷŮ˾þþò | ˾Ʒһ| þþþѿAƬAPP| ŷaԴ| ޾Ʒþþþ66| վѹۿ| ݺ޺ݺŷ2019| һѹۿ|