You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Greg Johnson <gr...@saltaire.com.au> on 2012/08/16 06:32:52 UTC

6.x should getTarget() in ChainingModel (or PropertyModel) be made public instead of protected?

hi,

for some validator use cases public getTarget() in AbstractPropertyModel was important for access to the parent object, eg for cross field validation.

this is now not possible in 6.x as getTarget() is now protected in ChainingModel and this breaks the above validator use case.

just like may 10 2007 Inspecting Property Models (http://wicket-dev.markmail.org/message/xy7edh2kghweab2p?q=gettarget+propertymodel) ... it is possible to  create a subclass but it's pretty restrictive and
unfortunate that users are forced to use a non-standard property model.

given the implementation of ProperyModel is already exposed with propertyExpression(), is it possible to also expose the parent object with public getTarget() as per 1.5.6, in either ChainingModel or PropertyModel?

thanks,

regards,
greg johnson