qiaojian01 / rapid-framework

Automatically exported from code.google.com/p/rapid-framework
0 stars 0 forks source link

extremetable组件列排序问题 #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
当column property是aaa_bbb时,排序时会生成sort by 
aaa.bbb这样的形式,但是当数
据库里的列名本来就是aaa_bbb时怎么办?

Original issue reported on code.google.com by wangya...@gmail.com on 30 Sep 2009 at 8:07

GoogleCodeExporter commented 8 years ago
这个看来是服务端问题,或你直接修改一下源码,该类是ExtremeTa
blePageRequestFactory,下面的
代码会将"_"转换为"."
{{{
    public static String getSortingColumns(Limit limit, String 
defaultSortColumns) {
        if(limit.getSort().getProperty() == null) {
            return defaultSortColumns;
        }

        String sortOrder = limit.getSort().getSortOrder() == null ? ""  : " " 
+ limit.getSort().getSortOrder();
        String column = limit.getSort().getProperty().replace('_', '.');
        String sortColumns = column + sortOrder;
        return sortColumns;
    }
}}}

[http://rapid-framework.googlecode.com/svn/trunk/rapid-
framework/src/rapid_framework_common/cn/org/rapid_framework/extremecomponents/Ex
treme
TablePageRequestFactory.java ExtremeTablePageRequestFactory.java源码]

还有如果你不需要导出功能的话,推荐使用simpletable替换ec,simpl
etable更加灵活

Original comment by bad...@gmail.com on 1 Oct 2009 at 1:34

GoogleCodeExporter commented 8 years ago
以后的版本已经修改这个问题,你可以下载rapid的持续集成,
自己构建出来一个版本,然后更新一
下rapid-framework.jar就行了。

持续集成下载
http://code.google.com/p/rapid-framework/wiki/cruisecontrol

Original comment by bad...@gmail.com on 9 Oct 2009 at 1:13