Wicket 6 IColumn How the name can be of type other than string?

↘锁芯ラ 提交于 2019-12-06 08:37:47

In your example using a PropertyColumn<SomeClass, Long> you have to use a Long value as the second parameter, as this is the type of the sort property.

If your sort property is a String, simply use PropertyColumn<SomeClass, String> and pass your property to the constructor.

javadoc at http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/markup/html/repeater/data/table/IColumn.html says

getSortProperty

java.lang.String getSortProperty()

    Returns the name of the property that this header sorts. If null is returned the header will be unsortable.

    Returns:
        a string representing the sort property
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!