public class PropertyColumn<T, S> extends AbstractColumn<T, S> implements
IExportableColumn<T, S, Object>
{
...
/**
* Factory method for generating a model that will generated the displayed
value. Typically the
* model is a property model using the {@link #propertyExpression}
specified in the constructor.
*
* @param rowModel
* @return model
*/
@Override
public IModel<Object> getDataModel(IModel<T> rowModel)
{
PropertyModel<Object> propertyModel = new PropertyModel<>(rowModel,
propertyExpression);
return propertyModel;
}
}
Should the return type getDataModel(IModel<T> rowModel) rather be IModel<?>
? It is now impossible to return Model.of("foo") for instance, as
Model<String> can't be cast to IModel<Object>
Martijn