幸せのちから

平凡的世界
看似平常实崎岖
成如容易却艰辛

eXtremeComponents发布1.0.1-RC1版

        eXtremeComponents发布1.0.1-RC1版,大家可以从SourceForge下载(http://sourceforge.net/projects/extremecomp)。
        相关的中文文档大家可以从Sina信箱中下载(用户名和密码都是:  extremetable)。

posted on 2006-04-30 14:34 Lucky 阅读(4979) 评论(23)  编辑  收藏 所属分类: extremeComponents

评论

# 报告一个bug 2006-05-03 16:42 squall

在全局配置文件中设置了column.format.currency后,连number cell的格式都是用的currency格式,设了column.format.number都没效果。  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-03 16:44 squall

看了一下源码,Column的isCurrency方法有问题,只要是org.extremecomponents.table.cell.NumberCell不管别名定义什么都会反回true  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-07 14:39 xplucky

@squall
你可以和我联系:xplucky@gmail.com,把问题发给我.  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-07 14:41 xplucky

@squall
你可以看看http://www.blogjava.net/lucky/archive/2006/04/21/42345.html,然后把相关的信息发给我:xplucky@gmail.com。
  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-08 12:23 squall

在eXtremeComponents_CN上好像发帖成功但看不到,还是发到这儿来了。
在全局配置文件中设置了column.format.currency后,连number cell的格式都是用的currency格式,设了column.format.number都没效果,除非为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方法有问题,只要是org.extremecomponents.table.cell.NumberCell实现不管别名定义什么都会反回true  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-08 12:44 xplucky

你还是没看"后记",您能不能最少把JSP贴出来,要不能我怎么知道你怎么用的? ^_^  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-08 22:39 squall

来了
<ec:table form="tmpForm" items="clist" tableId="callCenterRuning">
<ec:row>
<ec:column property="corpName" title="单位名称" />
<ec:column property="clientNum" title="客户数" cell="number" />
<ec:column property="cashOrderNum" title="现结订单数" cell="number" />
<ec:column property="unbalanceOrderNum" title="未结算订单数" cell="number" />
<ec:column property="cancelOrderNum" title="作废订单数" cell="number" />
<ec:column property="otherOrderNum" title="其它订单数" cell="number" />
<ec:column property="bespeakAmount" title="订货数" cell="number" />
<ec:column property="bespeakMoney" title="订货金额" cell="currency" />
<ec:column property="boxPrice" title="单箱均价" cell="currency" />
</ec:row>
</ec:table>  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-09 18:34 Lucky

其实你声明的cell=“number” 和cell=“currency” 指向的都是同一个Cell,关键是你得通过声明不同的format来达到你的需求:

对于货币只需要设置format属性:
<ec:column property="payroll" cell="currency" format="###,###,##0.00"/>  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-09 18:39 Lucky

其实你声明的cell=“number” 和cell=“currency” 指向的都是同一个Cell,关键是你得通过声明不同的format来达到你的需求:

对于货币只需要设置format属性:
<ec:column property="payroll" cell="currency" format="###,###,##0.00"/>

http://www.blogjava.net/lucky/articles/33380.html#d0e436  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-10 11:36 squall

我现在就是这么用的,但是我觉得同一个cell能在配置中声明多个别名,那样代码应该更简洁,比如
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
当写成
<ec:column property="payroll" cell="number" /> 就应该用format.number
<ec:column property="payroll" cell="currency" />就应该用format.currency
这样是不是更好些,现在cell为currency不用设定format属性,会自动的找到format.currency,为什么不能统一成这样呢?  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-10 12:34 xplucky

@squall
现在EC里面就是这么用的
column.cell.number=org.extremecomponents.table.cell.NumberCell
column.cell.currency=org.extremecomponents.table.cell.NumberCell

<ec:column property="payroll" cell="number" /> 就应该用format.number
<ec:column property="payroll" cell="currency" />就应该用format.currency ”
cell 不一定有format, 为什么”cell为currency不用设定format属性“ 是因为我们考虑一般使用的currency和Date对于一般的应用应该是相对固定的,而number他的format格式就不一定固定。
EC提供的是我们理解常用的东西,但是每个项目的环境、需求不一样,所以我们提供了比较好的扩展、定制机制。比如说你这个想formatnumber,你只需要把columndefault的getFormatInResourceBundle()、getFormatInProperties()方法稍微修改一下就ok了。  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-10 15:25 squall

我就是不想改代码,改了代码后等extremetable升级了又得改,我倒是很乐意做扩展,如果做成我上面说的方式按别名配置只需要在配置文件中配配就可以得到扩展不是更好,这样一个cell可得到最大的重用,当然我只是提提建议。  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-10 15:30 xplucky

…^_^  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-12 17:37 squall

实在无法忍受到处写format了,自己改成自动的处理方式了,需要format的就两种cell,一种是date一种是number,很好改呀,而且改后灵活性更高,还是希望官方能做成这样。如果需要,我把代码给你提交。  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-12 17:38 squall

问一下,有没有合并单元格的支持?如果要两个cell的值做计算应该怎么做?  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-12 18:14 xplucky

@squall
format的修改不是太麻烦,正如我前面说的,我们的理解是currency的format一般在一个应用中会通用,所以我们会默认去调用。对于单纯的Number,默认是没有format的,而且还可能去parse一种格式然后format到另一种格式。每个应用会有自己的需求,所以才提供了定制,至于官方,Number的默认应该还是不会默认使用format的。谢谢你的好意!
EC现在还不支持合并单元格,现在可以做的就是计算单列的total和avage。不过你可以试试。  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-12 18:41 squall

看来你还没有理解我的意思,我的意思是不管cell是什么类型只要它是number和date就可以定制多种格式而不用在应用时一个个的写,比如说
<ec:table items="glist" tableId="goodSaleCigAmount">
<ec:row>
<ec:column property="startDate" title="开始时间" cell="date" />
<ec:column property="endDate" title="结束时间" cell="date" />
<ec:column property="amount" title="数量" cell="number" />
<ec:column property="amount1" title="数量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

这跟原来的没有冲突只是更灵活了更好维护了,不配置当然没有format了,parse和format属性同样生效  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-12 20:19 xplucky

{我的意思是不管cell是什么类型只要它是number和date就可以定制多种格式而不用在应用时一个个的写

currency就是Number的一种特殊应用,就是你说的那种应用。我们不可能去创建适用于任何工程的所有类似的东西,而且没必要。
大家可以根据自己项目的实际需求去定制它。  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-13 11:31 squall

org.extremecomponents.table.cell.NumberCell和org.extremecomponents.table.cell.DateCell本来就可以适用于任何工程,只是格式不同而已,但是现在的实现在配置中跟currency和date绑死了除非指定format属性,为了达到在配置中配置format还要把它们copy多份只是名字不同而已,这就是所谓的定制,能在配置中搞定的事,为什么非要写代码,而且还是重复的代码,我知道extremetable的扩展能力很强,但这个定制是不是有点多余???Number和Date本来就是特殊应用,要不然你们也不会单独实现DateCell、NumberCell了,currency只是一种形式而已,我看不出currency除了格式外它特殊在哪儿,即然你们已经实现了,又何必要我们重复造轮子呢?  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2006-05-13 21:10 xplucky

@squall
cell 不一定需要format, 为什么”cell为currency不用设定format属性“ 是因为我们考虑一般使用的currency和Date对于一般的应用应该是相对固定的,而number应用中的format格式就不一定固定。
EC提供的是我们理解常用的东西,但是每个项目的环境、需求不一样,所以我们提供了比较好的扩展、定制机制。  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2007-06-02 23:30 es

坦白的说,eXtremeComponents搞一大堆的依赖包也感觉很不爽,比如导出PDF还用什么fop0.20.5,,avalon(apache早就停止维护的项目),为什么不用
iText呢?这一点DisplayTag要好,看到有人常说DisplayTag因为一次性读取
数据到List中,其实一般做分页都是分次查询,根本不存在性能问题。
目前DisplayTag唯一美中不足的就是没有支持ajax,不过要自己扩展也是一样
容易。很多项目都用DisplayTag,我觉得还是很顺手的,不过这里也并没有贬低EC的意思,根据个人喜好选择,够用就好。  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2007-11-26 23:07 专注java开源

找到一个bug咯  回复  更多评论   

# re: eXtremeComponents发布1.0.1-RC1版 2008-04-30 17:18 fuyou

多谢了  回复  更多评论   


只有注册用户登录后才能发表评论。


网站导航:
 
<2006年4月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

导航

随笔分类(125)

文章分类(5)

日本語

搜索

积分与排名

最新随笔

最新评论