I'm working on replacing my AROM's and often they just call a getter.
In that case I'd rather use a method reference than doing the IModel
replacement.
Is there a reason why the LambdaModel doesn't have a path for only a getter?
This way I can do:
public A(String p, final SerializableSupplier<Boolean> visibility)
{
this(p);
condition = LambdaModel.of(visibility);
}
instead of:
public A(String p, final SerializableSupplier<Boolean> visibility)
{
this(p);
condition = new IModel<Boolean>() {
private static final long serialVersionUID = 1L;
@Override
public Boolean getObject() {
return visibility.get();
}
};
}
I have the code ready to push, shall I?
Martijn