0

この質問は既に出されています ( 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();

http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/extensions/markup/html/repeater/data/table/IColumn.html

改札の古いバージョン 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"); 

地面に何を書くか「?」

4

2 に答える 2