Hi,
regretfully Java lambdas don't provide type information via reflection.
Have fun
Sven
Am 16. Juni 2018 12:31:40 MESZ schrieb smallufo :
>Thanks .
>It works (but seems a little duplication)
>
>Andrew Geery 於 2018年6月16日 週六 下午5:32寫道:
>
>> You have to use the TextField constructor that
Thanks .
It works (but seems a little duplication)
Andrew Geery 於 2018年6月16日 週六 下午5:32寫道:
> You have to use the TextField constructor that specifies the type of the
> model:
>
>
You have to use the TextField constructor that specifies the type of the
model:
https://ci.apache.org/projects/wicket/apidocs/8.x/org/apache/wicket/markup/html/form/TextField.html#TextField-java.lang.String-org.apache.wicket.model.IModel-java.lang.Class-
It should be:
add(new
After upgrading to 8.0 , I tried the exciting LambdaModel , try to replace
the non-TypeSafety PropertyModel
But I found it cannot handle type intelligently.
For a TextField , for example :
form.add(new TextField("year", LambdaModel.of(obj::getYear,
obj::setYear )));
At runtime , it reports