[
https://issues.apache.org/jira/browse/WICKET-6318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15867201#comment-15867201
]
Pedro Santos commented on WICKET-6318:
--------------------------------------
> And I don't understand the "false promise" either :/.
We can take the example where an AbstractPropertyModel/PropertyModel holds a
property expression resolving a property inside a JSONObject (Wicket's custom
IPropertyLocator does enable such scenario). The
AbstractPropertyModel/PropertyModel name plus javadoc clearly states that *one*
property of a bean will be modeled/expressed. By also implementing
IPropertyReflectionAwareModel you add the additional promise that you can
provide this property's reflection information, which won't live up since there
is no reflection information you can give about a unique property in this
example.
> With your change now ValidationModelResolver#resolvePropertyModelFrom() works
> with AbstractPropertyModel only.
Good point. Any way AbstractPropertyModel is not the place for such interface.
Plus the annotations from validation api tested in wicket-bean-validation are
clearly designed for bean properties, so by covering Wicket's property models
we should be fine imo.
> How is this an improvement to the former IPropertyReflectionAwareModel? For
> example this won't work with LazyModel any longer :/.
If I understood you right, coherence imo. Without IPRAM, APM clearly says it
works by solely modeling a property with no need to provide reflection
information (given it was already not providing it for sure). Plus
AbstractPropertyModel's IPropertyReflectionAwareModel implementation never
worked with lazy models, actually this is the only reason why polymorphic bean
attribute types can get their annotations detected. This feature is even being
tested at PropertyValidatorRequiredTest where it's able to detect the @NotNull
constraint at TestContainedBean.
> To make PropertyResolver a configurable implementation
> ------------------------------------------------------
>
> Key: WICKET-6318
> URL: https://issues.apache.org/jira/browse/WICKET-6318
> Project: Wicket
> Issue Type: Sub-task
> Components: wicket
> Reporter: Pedro Santos
>
> To enable users to select each property resolver will be used, so if the new
> implementation shows problematic it can be switched back to the a Wicket's <
> 7 one.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)