幸せのちから

          平凡的世界
          看似平常實(shí)崎嶇
          成如容易卻艱辛

          eXtremeComponents發(fā)布1.0.1-RC1版

          ??????? eXtremeComponents發(fā)布1.0.1-RC1版,大家可以從SourceForge下載(http://sourceforge.net/projects/extremecomp)。
          ??????? 相關(guān)的中文文檔大家可以從Sina信箱中下載(用戶名和密碼都是:? extremetable)。

          posted on 2006-04-30 14:34 Lucky 閱讀(5018) 評(píng)論(23)  編輯  收藏 所屬分類: extremeComponents

          評(píng)論

          # 報(bào)告一個(gè)bug 2006-05-03 16:42 squall

          在全局配置文件中設(shè)置了column.format.currency后,連number cell的格式都是用的currency格式,設(shè)了column.format.number都沒(méi)效果。  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-03 16:44 squall

          看了一下源碼,Column的isCurrency方法有問(wèn)題,只要是org.extremecomponents.table.cell.NumberCell不管別名定義什么都會(huì)反回true  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-07 14:39 xplucky

          @squall
          你可以和我聯(lián)系:xplucky@gmail.com,把問(wèn)題發(fā)給我.  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-07 14:41 xplucky

          @squall
          你可以看看http://www.aygfsteel.com/lucky/archive/2006/04/21/42345.html,然后把相關(guān)的信息發(fā)給我:xplucky@gmail.com。
            回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-08 12:23 squall

          在eXtremeComponents_CN上好像發(fā)帖成功但看不到,還是發(fā)到這兒來(lái)了。
          在全局配置文件中設(shè)置了column.format.currency后,連number cell的格式都是用的currency格式,設(shè)了column.format.number都沒(méi)效果,除非為column的定format別名,附上配置
          table.autoIncludeParameters=false
          table.rowsDisplayed=10
          table.sortable=false
          table.view.html=org.extremecomponents.table.view.CompactView
          row.highlightRow=true
          table.imagePath=/images/table/compact/*.gif
          column.format.date=yyyy-MM-dd
          column.format.currency=¥###,###,##0.00
          column.format.percent=##0.00%
          column.format.number=##0.00
          看了一下源碼,Column的isCurrency方法有問(wèn)題,只要是org.extremecomponents.table.cell.NumberCell實(shí)現(xiàn)不管別名定義什么都會(huì)反回true  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-08 12:44 xplucky

          你還是沒(méi)看"后記",您能不能最少把JSP貼出來(lái),要不能我怎么知道你怎么用的? ^_^  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-08 22:39 squall

          來(lái)了
          <ec:table form="tmpForm" items="clist" tableId="callCenterRuning">
          <ec:row>
          <ec:column property="corpName" title="單位名稱" />
          <ec:column property="clientNum" title="客戶數(shù)" cell="number" />
          <ec:column property="cashOrderNum" title="現(xiàn)結(jié)訂單數(shù)" cell="number" />
          <ec:column property="unbalanceOrderNum" title="未結(jié)算訂單數(shù)" cell="number" />
          <ec:column property="cancelOrderNum" title="作廢訂單數(shù)" cell="number" />
          <ec:column property="otherOrderNum" title="其它訂單數(shù)" cell="number" />
          <ec:column property="bespeakAmount" title="訂貨數(shù)" cell="number" />
          <ec:column property="bespeakMoney" title="訂貨金額" cell="currency" />
          <ec:column property="boxPrice" title="單箱均價(jià)" cell="currency" />
          </ec:row>
          </ec:table>  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-09 18:34 Lucky

          其實(shí)你聲明的cell=“number” 和cell=“currency” 指向的都是同一個(gè)Cell,關(guān)鍵是你得通過(guò)聲明不同的format來(lái)達(dá)到你的需求:

          對(duì)于貨幣只需要設(shè)置format屬性:
          <ec:column property="payroll" cell="currency" format="###,###,##0.00"/>  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-09 18:39 Lucky

          其實(shí)你聲明的cell=“number” 和cell=“currency” 指向的都是同一個(gè)Cell,關(guān)鍵是你得通過(guò)聲明不同的format來(lái)達(dá)到你的需求:

          對(duì)于貨幣只需要設(shè)置format屬性:
          <ec:column property="payroll" cell="currency" format="###,###,##0.00"/>

          http://www.aygfsteel.com/lucky/articles/33380.html#d0e436  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-10 11:36 squall

          我現(xiàn)在就是這么用的,但是我覺(jué)得同一個(gè)cell能在配置中聲明多個(gè)別名,那樣代碼應(yīng)該更簡(jiǎn)潔,比如
          column.cell.number=org.extremecomponents.table.cell.NumberCell
          column.cell.currency=org.extremecomponents.table.cell.NumberCell
          column.format.number=###,##0.00
          column.format.currency=$###,##0.00
          當(dāng)寫(xiě)成
          <ec:column property="payroll" cell="number" /> 就應(yīng)該用format.number
          <ec:column property="payroll" cell="currency" />就應(yīng)該用format.currency
          這樣是不是更好些,現(xiàn)在cell為currency不用設(shè)定format屬性,會(huì)自動(dòng)的找到format.currency,為什么不能統(tǒng)一成這樣呢?  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-10 12:34 xplucky

          @squall
          現(xiàn)在EC里面就是這么用的
          column.cell.number=org.extremecomponents.table.cell.NumberCell
          column.cell.currency=org.extremecomponents.table.cell.NumberCell

          <ec:column property="payroll" cell="number" /> 就應(yīng)該用format.number
          <ec:column property="payroll" cell="currency" />就應(yīng)該用format.currency ”
          cell 不一定有format, 為什么”cell為currency不用設(shè)定format屬性“ 是因?yàn)槲覀兛紤]一般使用的currency和Date對(duì)于一般的應(yīng)用應(yīng)該是相對(duì)固定的,而number他的format格式就不一定固定。
          EC提供的是我們理解常用的東西,但是每個(gè)項(xiàng)目的環(huán)境、需求不一樣,所以我們提供了比較好的擴(kuò)展、定制機(jī)制。比如說(shuō)你這個(gè)想formatnumber,你只需要把columndefault的getFormatInResourceBundle()、getFormatInProperties()方法稍微修改一下就ok了。  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-10 15:25 squall

          我就是不想改代碼,改了代碼后等extremetable升級(jí)了又得改,我倒是很樂(lè)意做擴(kuò)展,如果做成我上面說(shuō)的方式按別名配置只需要在配置文件中配配就可以得到擴(kuò)展不是更好,這樣一個(gè)cell可得到最大的重用,當(dāng)然我只是提提建議。  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-10 15:30 xplucky

          …^_^  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-12 17:37 squall

          實(shí)在無(wú)法忍受到處寫(xiě)format了,自己改成自動(dòng)的處理方式了,需要format的就兩種cell,一種是date一種是number,很好改呀,而且改后靈活性更高,還是希望官方能做成這樣。如果需要,我把代碼給你提交。  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-12 17:38 squall

          問(wèn)一下,有沒(méi)有合并單元格的支持?如果要兩個(gè)cell的值做計(jì)算應(yīng)該怎么做?  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-12 18:14 xplucky

          @squall
          format的修改不是太麻煩,正如我前面說(shuō)的,我們的理解是currency的format一般在一個(gè)應(yīng)用中會(huì)通用,所以我們會(huì)默認(rèn)去調(diào)用。對(duì)于單純的Number,默認(rèn)是沒(méi)有format的,而且還可能去parse一種格式然后format到另一種格式。每個(gè)應(yīng)用會(huì)有自己的需求,所以才提供了定制,至于官方,Number的默認(rèn)應(yīng)該還是不會(huì)默認(rèn)使用format的。謝謝你的好意!
          EC現(xiàn)在還不支持合并單元格,現(xiàn)在可以做的就是計(jì)算單列的total和avage。不過(guò)你可以試試。  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-12 18:41 squall

          看來(lái)你還沒(méi)有理解我的意思,我的意思是不管cell是什么類型只要它是number和date就可以定制多種格式而不用在應(yīng)用時(shí)一個(gè)個(gè)的寫(xiě),比如說(shuō)
          <ec:table items="glist" tableId="goodSaleCigAmount">
          <ec:row>
          <ec:column property="startDate" title="開(kāi)始時(shí)間" cell="date" />
          <ec:column property="endDate" title="結(jié)束時(shí)間" cell="date" />
          <ec:column property="amount" title="數(shù)量" cell="number" />
          <ec:column property="amount1" title="數(shù)量1" cell="intNumber" />
          <ec:column property="currency" title="金額" cell="currencyNumber" />
          <ec:column property="rate" title="比重" cell="percentNumber" />
          </ec:row>
          </ec:table>

          column.format.date=yyyy-MM-dd

          column.cell.percentNumber=org.extremecomponents.table.cell.NumberCell
          column.format.percentNumber=##0.00%
          column.cell.currencyNumber=org.extremecomponents.table.cell.NumberCell
          column.format.currencyNumber=¥###,###,##0.00
          column.cell.intNumber=org.extremecomponents.table.cell.NumberCell
          column.format.intNumber=##0.00

          column.format.number=##0.00

          這跟原來(lái)的沒(méi)有沖突只是更靈活了更好維護(hù)了,不配置當(dāng)然沒(méi)有format了,parse和format屬性同樣生效  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-12 20:19 xplucky

          {我的意思是不管cell是什么類型只要它是number和date就可以定制多種格式而不用在應(yīng)用時(shí)一個(gè)個(gè)的寫(xiě)

          currency就是Number的一種特殊應(yīng)用,就是你說(shuō)的那種應(yīng)用。我們不可能去創(chuàng)建適用于任何工程的所有類似的東西,而且沒(méi)必要。
          大家可以根據(jù)自己項(xiàng)目的實(shí)際需求去定制它。  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-13 11:31 squall

          org.extremecomponents.table.cell.NumberCell和org.extremecomponents.table.cell.DateCell本來(lái)就可以適用于任何工程,只是格式不同而已,但是現(xiàn)在的實(shí)現(xiàn)在配置中跟currency和date綁死了除非指定format屬性,為了達(dá)到在配置中配置format還要把它們copy多份只是名字不同而已,這就是所謂的定制,能在配置中搞定的事,為什么非要寫(xiě)代碼,而且還是重復(fù)的代碼,我知道extremetable的擴(kuò)展能力很強(qiáng),但這個(gè)定制是不是有點(diǎn)多余???Number和Date本來(lái)就是特殊應(yīng)用,要不然你們也不會(huì)單獨(dú)實(shí)現(xiàn)DateCell、NumberCell了,currency只是一種形式而已,我看不出currency除了格式外它特殊在哪兒,即然你們已經(jīng)實(shí)現(xiàn)了,又何必要我們重復(fù)造輪子呢?  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2006-05-13 21:10 xplucky

          @squall
          cell 不一定需要format, 為什么”cell為currency不用設(shè)定format屬性“ 是因?yàn)槲覀兛紤]一般使用的currency和Date對(duì)于一般的應(yīng)用應(yīng)該是相對(duì)固定的,而number應(yīng)用中的format格式就不一定固定。
          EC提供的是我們理解常用的東西,但是每個(gè)項(xiàng)目的環(huán)境、需求不一樣,所以我們提供了比較好的擴(kuò)展、定制機(jī)制。  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2007-06-02 23:30 es

          坦白的說(shuō),eXtremeComponents搞一大堆的依賴包也感覺(jué)很不爽,比如導(dǎo)出PDF還用什么fop0.20.5,,avalon(apache早就停止維護(hù)的項(xiàng)目),為什么不用
          iText呢?這一點(diǎn)DisplayTag要好,看到有人常說(shuō)DisplayTag因?yàn)橐淮涡宰x取
          數(shù)據(jù)到List中,其實(shí)一般做分頁(yè)都是分次查詢,根本不存在性能問(wèn)題。
          目前DisplayTag唯一美中不足的就是沒(méi)有支持ajax,不過(guò)要自己擴(kuò)展也是一樣
          容易。很多項(xiàng)目都用DisplayTag,我覺(jué)得還是很順手的,不過(guò)這里也并沒(méi)有貶低EC的意思,根據(jù)個(gè)人喜好選擇,夠用就好。  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2007-11-26 23:07 專注java開(kāi)源

          找到一個(gè)bug咯  回復(fù)  更多評(píng)論   

          # re: eXtremeComponents發(fā)布1.0.1-RC1版 2008-04-30 17:18 fuyou

          多謝了  回復(fù)  更多評(píng)論   

          <2006年4月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          30123456

          導(dǎo)航

          隨筆分類(125)

          文章分類(5)

          日本語(yǔ)

          搜索

          積分與排名

          最新隨筆

          最新評(píng)論

          主站蜘蛛池模板: 北流市| 云浮市| 花垣县| 麻江县| 溧阳市| 湄潭县| 朝阳区| 望都县| 西贡区| 镇坪县| 华宁县| 青阳县| 四子王旗| 鹤庆县| 临颍县| 明星| 龙山县| 关岭| 宜州市| 怀宁县| 万源市| 景东| 许昌县| 阜新| 池州市| 永登县| 庄河市| 遂昌县| 临桂县| 犍为县| 天气| 广灵县| 万荣县| 全南县| 青岛市| 郓城县| 永新县| 阿拉善左旗| 丹江口市| 曲水县| 齐河县|