【发布时间】:2013-06-12 11:51:23
【问题描述】:
这个问题已经被问过 (Wicket 6 IColumn How the name can be of type other than string?),但没有得到回答。我用粗体突出了要回答的问题...
接口 IColumn 包含一个方法 getSortProperty(),它返回任何类型 S 的值。名称如何可以是字符串以外的类型?
/**
* Returns the name of the property that this header sorts. If null is returned the header will
* be unsortable.
*
* @return the sort property
*/
S getSortProperty();
在 wicket 旧版本 6 中:
PropertyColumn<SomeClass> column = new PropertyColumn(Model.of("Header"), "sortProperty", "propertyExpression");
检票口 6:描述:
PropertyColumn(IModel<String> displayModel, S sortProperty, String propertyExpression);
示例:
PropertyColumn<SomeClass, Long> column = new PropertyColumn(Model.of("Header"), ?, "propertyExpression");
在地上写什么“?”
【问题讨论】: