thanks. what's required is getInnermostModelOrObject().

the method names for getInnermostModelOrObject(), getChainedModel() etc appear to be somewhat confusing and/or the api docs do not appear to be extensive enough for the average user.

even the name getInnermostModelOrObject() appears weak and smells of a coupling issue but i'm afraid i don't have enough internal knowledge or insight to make an alternative suggestion.

thanks for a superb product.

regards

On 17/08/12 3:06, Sven Meier wrote:
Can't you just use #getChainedModel()?

Sven

Greg Johnson <[email protected]> schrieb:

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


Reply via email to