0.姒傝堪
Home Page:http://www.extremecomponents.org
Extreme Table鏄渶鍔熻兘寮哄ぇ鑰屽張瀹規槗閰嶇疆,鎵╁睍,鑷畾涔夌殑Table 鎺т歡銆?/p>
鏈绱ц鐨勫姛鑳藉寘鎷帓搴? 鍒嗛〉, 瀵煎嚭Excel, pdf鍜屾眹鎬匯?/p>
springside鐨刡est 紺轟緥浠g爜鍦? listBook.jsp鍜宭istOrder.jsp.
鍩虹璇葷墿:
2.Luck緲昏瘧鐨凟xtremeTable瀹樻柟鏂囨。涓枃鐗?/a>
1. 浠?a >http://www.extremecomponents.org 涓嬭澆鏈鏂扮増
2.鎶奺xtremecomponents.jar 鏀懼叆web-inf/lib
3.鏍規嵁minum, 瀵煎嚭excel 鎴?瀵煎嚭pdf鐨勯渶瑕侊紝鎶?lib涓嬬殑jar copy鍒皐eb-inf/lib
4.鎶奿mages閲岀殑鍥劇墖鏀懼叆web鐨勪換鎰忕洰褰?/p>
5.鎶奵ss鏂囦歡鏀懼埌web鐨勪換鎰忕洰褰?/p>
6.鍦?source/org/extremecomponents/table/core鐩綍鎵懼埌extremetable.properties鏂囦歡,鎶婂畠澶嶅埗鍒癢EB-INF/classes閲岄潰騫惰繘琛屼慨鏀?
7.淇敼web.xml (瑙?)銆?/p>
1.Copy springside鐨凾able Head鐨勫浘錛屾煡銆?/p>
2.灝唖pringside涓殑淇敼鐗坋xtremecomponents.css鏂囦歡鏀懼叆浠繪剰鐩綍
3.鎶?src/resource/extremetable.properties 澶嶅埗鍒板搴旂洰褰?/p>
榛樿鐨勫紡鏍蜂笉絎﹀悎澶у鐨勫緹庯紝騫鎬簭榪樻湁Compact View鍜宑ss璁劇疆錛岃鎴戜滑鍙互鏁阿涓嶆晱瀹冨彿縐伴潪甯告柟渚跨殑HtmlView瀛愮被鎵╁睍銆?/p>
1. 鍦ㄥ叏灞璁劇疆閲?/p>
table.view.html=org.extremecomponents.table.view.CompactView
2.鎶奿mages閲?table/compact/*.gif copy 鍒?/table
ExtremeTable鏀寔鍦╬roperties鏂囦歡閲屾柟渚跨殑緇熶竴閰嶇疆涓板瘜鐨勫叏灞灞炴?/p>
鍦?source/org/extremecomponents/table/core鐩綍鎵懼埌extremetable.properties鏂囦歡,鎶婂畠澶嶅埗鍒癢EB-INF/classes閲岄潰.
鍦╳eb.xml閲岄潰澧炲姞
<context-param>
<param-name>extremecomponentsPreferencesLocation</param-name>
<param-value>/extremetable.properties</param-value>
</context-param>
涓鑸彧鍐欓渶瑕佷慨鏀圭殑鏂囦歡:
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
娉ㄦ剰Excel 瀵煎嚭鐨凾ag宸叉敼涓猴紝涓斿畼鏂圭増涓嶆敮鎸佷腑鏂囨枃浠跺悕銆?/p>
<ec:exportXls fileName="BookList.xls" tooltip="瀵煎嚭 Excel"/>
鍦╳eb.xml蹇呴』鍔犲叆錛?/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瀵煎嚭鐨勪竴欏歸噸瑕佺壒鎬ф槸鍙互鏍規嵁涓嶅悓鐨刅iew瀵煎嚭涓嶅悓鐨勫垪.
姣斿html綆$悊鐣岄潰鍙兘鍙垪鍑鴻鍗曞嚑涓渶閲嶈鐨勫垪錛岃屽鍑篹xcel鏃跺垯闇瑕佸鍑烘墍鏈夌殑鍒椼?/p>
<ec:column property="orderdate" title="璁㈠崟鏃ユ湡" cell="date" format="yyyy-MM-dd" viewsDenied= "html"/>
鍙堟瘮濡傛湁浜涙搷浣滄寜綰界殑鍒楀彧鎯沖湪html鍑虹幇,excel閲屼笉鎯沖嚭鐜幫細
<ec:column property="orderdate" title="璁㈠崟鏃ユ湡" viewAllowed= "html"/>
浠ヤ笂璁㈠崟鏃ユ湡鍒楀湪html view鐪嬩笉鍒幫紝鑰宔xcel,pdf view鍙互瑙佸埌.
鑰?緙栬緫鍥炬爣"錛?閫夋嫨Checkbox"榪欎簺綆$悊鐣岄潰涓婄殑鍒楋紝涔熷彲浠ヨ緗笉export鍒皃df,excel view
鍥犱負javascript鐨勫叧緋?
<ec:column property="customer.name" title="瀹㈡埛鍚嶇О" alias="customer"/>
鍦ㄥ叏灞灞炴у畾涔?
column.format.date= yyyy-MM-dd column.format.currency= 錕?##,###,#00.00
<ec:column property="totalprice" title="鎬婚噾棰? cell="currency" width="80" />
<ec:column property="shipdate" title="鍙戣揣鏃ユ湡" cell="date" width= "80"/>
<e
鍏朵腑RowCountCell鐢ㄤ簬鏄劇ず搴忓彿銆?/p>
鍦╟olumn涓姞鍏ヤ袱涓猚ac灞炴э紝灝變細鑷姩鍦╰able鐨勫簳绔樉紺烘眹鎬?/p>
<ec:column property="totalprice" title="鎬婚噾棰? cell="number" format="###,###,##0.00" calc="total" calcTitle= "姹囨?"/>
鍦╓eb.xml閲岄潰鎸囧畾i18N鐨凱roperties鏂囦歡
<context-param>
<param-name>extremecomponentsMessagesLocation</param-name>
<param-value>messages</param-value>
</context-param>
<ec:column property="name" title="book.name"/>
EC榛樿浠庢暟鎹簱涓煡鎵炬墍鏈夎褰曠劧鍚庣敱瀹冩潵鍒嗛〉錛屽鏋滄煡璇㈢粨鏋滆緝澶э紝鍙互鑰冭檻浣跨敤鏁版嵁搴撶鍒嗛〉鐨勬柟妗堛?/p>
姝ゆ椂錛孍C浼氫嬌鐢↙imit瀵硅薄鍚慍ontroller浼犻扨ageNo,PageSize,OrderBy絳夊垎欏典俊鎭傝屾湇鍔$灝嗗悜EC榪斿洖鎬昏褰曟暟鍜屽綋鍓嶉〉鐨勫唴瀹癸紝鍏蜂綋璇峰弬鐪?BookController銆?/p>
鏈蹇殑鏂瑰紡鏄緗畉able鐨剆howStatusBar= false
<ec:table items= "order.orderItems"var="item" action="" showStatusBar= "false">
鏃х増EC鍖呮嫭鍏舵枃妗i兘鍦ㄦ瘡涓猼able tag閲屽畾涔塈magePath, 鏂扮増宸茬粡鍙互鑷姩鎻掑叆ContextPath,鍙渶鍦╬roperties鏂囦歡瀹氫箟table.imagePath=/images/table/*.gif鍗沖彲
ExtremeTable姣擠isplay Tag鐨刬涓涓氨鏄壇濂界殑鑷畾涔夊拰鎵╁睍鑳藉姏錛屼笉鐢ㄥ崈浜轟竴闈€?br /> 涓嶈繃錛屼漢鎬繪槸鎳掔殑錛岃櫧鐒舵墿灞曞瓙綾誨緢瀹規槗錛屼絾鑳戒笉鎵╁睍灝辮繕鏄笉鍙墿灞曚簡銆傚垢浜忕敤Compact View鍐嶆敼鏀笴SS涓鑸氨鑳借揪鍒拌姹傘?/p>
ExtremeTable 鐨凜SS瀹氫箟闈炲父涓ヨ皚, 騫朵笖鎻愪緵寰堝涓眰嬈$殑淇敼鏂瑰紡:
1.鐩存帴淇敼css鏂囦歡, 鍙互鎶妕able view鏀規垚浠繪剰鏍峰紡
2.淇敼鍏ㄥ眬灞炴? 鏀瑰彉鏌愮鍏冪礌瀵瑰簲鐨刢ss class鍚?/p>
table.styleClass=tableRegion
3.鍦ㄦ煇涓〉闈㈢殑row,column tag涓畾涔塩lass
<ec:row style="" or styleClass=""/>
SpringSide閲囩敤灞傛1, 鐩存帴淇敼extremecomponents.css涓哄悎閫傜殑鏍峰紡
row涓巆olumn宸叉彁渚涗簡涓板瘜鐨勬櫘閫氬睘鎬т笌 javascript灞炴уonClick(), 濡傛灉灞炴т粛鐒舵湭澶?鍙嚜琛屾墿灞?lt;row>涓?lt;column>tag 錛屽茍閫氳繃鍏ㄥ眬灞炴ф寚瀹氭柊鐨勫瓙綾誨悕銆?/p>
涓轟簡鏂逛究澶у鍦ㄥ瓙綾繪墿灞曞睘鎬? extreme Table鎻愪緵浜嗕笓闂ㄧ殑鍥炶皟鍑芥暟涓嶶til鍑芥暟濡?/p>
public void addColumnAttributes(Column column) { column.addAttribute("customAttributeOne", customAttributeOne);
}
璇︾粏璇風湅鎵嬪唽,Table, Row,Column閮芥彁渚涚浉鍚岀殑鎵╁睍:
http://extremecomponents.org/wiki/index.php/Column#Extended_Attributes
濡傛灉涓嶆槸Extremetable鐨勭壒鍒敮鎸? 鏅歵aglib class瑕佹墿灞曞睘鎬х殑璇?
1.瀹氫箟鐪熸鐨凧ava灞炴?setter,getter
2. tld鏂囦歡涓0鏄庢柊鐨勫睘鎬?
3.閲嶈澆杈撳嚭鍑芥暟灝嗘柊灞炴ф墦鍗板嚭鏉?/p>
Extreme Table鍦ㄨ繖浜涚被鐨勬墿灞曚笂鏀句究寰堝錛屼絾榪欎釜鐗堟湰閲屾垜榪樻病鏈夎繘琛屽皾璇曪紝灝變笉鍐欎簡銆傝鑷鍙傝冨畼鏂規枃妗?http://extremecomponents.org/wiki/index.php/Html_View_Tutorial .
http://www.springside.org.cn/docs/reference/ExtremeTable.htm