eXtreme Table 的基本用法及配製

1。簡介: 
     Extreme Table 是ExtremeCompontents(Home Page:http://www.extremecomponents.org? )中一個功能強大     而又容易配置,擴展,自定義的Table 控件,其功能包括排序, 分頁, 導出Excel, pdf和彙總。 

2。基本配製: 
     1)首先下載發行包 http://sourceforge.net/projects/extremecomp; 
     2)將包內的extremecomponents.jar 文件拷貝到項目的 WEB-INF/lib 目錄中   
     3)將 dist 目錄中的 extremecomponents.tld 文件拷貝到 WEB-INF 中     
     4)將 test 目錄中的 test.jsp 文件拷貝到 webroot目錄中  (測試用Demo) 
     5)將 images 文件夾拷貝到 webroot目錄中 
     6)將  extremecomponents.css 拷貝到 webroot/css目錄中 
     7)在/source/org/extremecomponents/table/core目錄找到extremetable.properties文件, 
       把它複製到src/conf裏面並進行修改(ExtremeTable支持在properties文件裏方便的統一配置豐富的全局屬性). 

        在extremetable.properties裏通常只寫須要修改的文件: 
          
Java代碼    收藏代碼
  1. table.filterable=false  
  2.            table.imagePath=/images/table/*.gif  
  3.            table.locale=zh_CN  
  4.            table.view.html=org.extremecomponents.table.view.CompactView  
  5.            row.highlightRow=true  
  6.            column.format.date=yyyy-MM-dd  
  7.            column.format.currency=###,###,###,###,#00.00  

            
        在web.xml中加上: 
           
Java代碼    收藏代碼
  1. <context-param>  
  2.                 <param-name>extremecomponentsPreferencesLocation</param-name>  
  3.                 <param-value>/extremetable.properties</param-value>  
  4.             </context-param>  
3. 測試: 
      
       到些一些基本配製已完畢,運行Tomcat,訪問http://localhost:8080/test.jsp 
       OK去試試吧! 
相關文章
相關標籤/搜索