You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Gabriel Landon <gl...@piti.pf> on 2019/04/25 20:42:01 UTC

LambdaModel does not implements IPropertyReflectionAwareModel

Hi,

I'm moving projects from wicket 7.0 to wicket 8.0 that use the
wicket-bean-validation module for automatic validation of form (@NotNull,
@Size, ...).

I'm now using the LambdaModel instead of PropertyModel, but unfortunately,
LambdaModel does not implement IPropertyReflectionAwareModel, so I cannot
use the wicket-validation module anymore as the ValidationModelResolver
class is based on IPropertyReflectionAwareModel.

Is there another way to do validation with LambdaModel?
Or is it possible to add the interface IPropertyReflectionAwareModel to
LambdaModel?

Regards,
Gabriel.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: LambdaModel does not implements IPropertyReflectionAwareModel

Posted by Gabriel Landon <gl...@piti.pf>.
Sven,

Thank you for your help.
I will stick with PropertyModel.

Regards,
Gabriel.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: LambdaModel does not implements IPropertyReflectionAwareModel

Posted by Sven Meier <sv...@meiers.net>.
 
 
Hi,
 

 
just a thought:
 

 
for bean-validation with lamdamodels it might be easier to validate the bean as a whole and map the resulting errors to Wicket form components afterwards.
 

 
Have fun
 
Sven
 
 
 

 
 
 
 
 
>  
> On 02.05.2019 at 23:03,  <Gabriel Landon>  wrote:
>  
>  
>  Sven, Thank you for your help. I will stick with PropertyModel. Regards, Gabriel. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org For additional commands, e-mail: users-help@wicket.apache.org 
>  
     

Re: LambdaModel does not implements IPropertyReflectionAwareModel

Posted by Sven Meier <sv...@meiers.net>.
 
 
Hi,
 

 
lambdas are just functions without any meta information;
 

 
 https://stackoverflow.com/questions/52551806/wicket-lambdamodel-and-numbertextfield-cannot-resolvetype
 

 
Lambdamodel doesn't know anything about the underlying property :(.
 

 
Sven
 
 
 

 
 
 
 
 
>  
> On 25.04.2019 at 22:42,  <Gabriel Landon>  wrote:
>  
>  
>  Hi, I'm moving projects from wicket 7.0 to wicket 8.0 that use the wicket-bean-validation module for automatic validation of form (@NotNull, @Size, ...). I'm now using the LambdaModel instead of PropertyModel, but unfortunately, LambdaModel does not implement IPropertyReflectionAwareModel, so I cannot use the wicket-validation module anymore as the ValidationModelResolver class is based on IPropertyReflectionAwareModel. Is there another way to do validation with LambdaModel? Or is it possible to add the interface IPropertyReflectionAwareModel to LambdaModel? Regards, Gabriel. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org For additional commands, e-mail: users-help@wicket.apache.org 
>