Hi,
you can call #getPath() on LazyModel and drop everything before the last
dot:
"foo.bar.baz" -> "baz"
Since IPropertyReflectionAwareModel is in wicket-core (I wasn't aware of
that), your first solution should be possible too.
Regards
Sven
On 08/13/2013 05:16 AM, Gabriel Landon wrote:
Hi,
I've been using wicketstuff-lazymodel for weeks now and I love it!
Now I'm trying to use it with wicket-bean-validation, but I've got the
following error :
/Could not resolve Property from component: [TextField [Component id =
code]]. Either specify the Property in the constructor or use a model that
works in combination with a IPropertyResolver to resolve the Property
automatically/
So I have 2 solutions :
-Have LazyModel implements IPropertyReflectionAwareModel
Or
-Implement a new IPropertyResolver like the DefaultPropertyResolver
2nd solution seems easier. I should return a
org.apache.wicket.bean.validation.Property :
"public Property(Class<?> owner, String propertyName)"
I know how to get the class from LazyModel with "getObjectClass()", but how
can I get the field name?
Any help on this would be very nice.
Regards,
Gabriel.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/wicketstuff-lazymodel-and-wicket-bean-validation-tp4660857.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]