You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/08/07 16:16:12 UTC
[jira] [Resolved] (WICKET-4941) Component.initModel() does not
cause parent models to be initialized
[ https://issues.apache.org/jira/browse/WICKET-4941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-4941.
-------------------------------------
Resolution: Not a Problem
As explained in the dev@ mailing lists (http://markmail.org/message/mxyja6rutrghwo6v) you need to use fully qualified component ids to achieve what you need.
In the quickstart that is "street1" should be "address.street1".
> Component.initModel() does not cause parent models to be initialized
> --------------------------------------------------------------------
>
> Key: WICKET-4941
> URL: https://issues.apache.org/jira/browse/WICKET-4941
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 6.4.0
> Environment: All
> Reporter: Andrew Geery
> Priority: Minor
> Attachments: myproject.zip
>
>
> When using a nested CompoundPropertyModel, properties are not resolved against the correct model. One way to deal with this is to override the IModel<?> initModel() method. However, this method does not work unless getDefaultModel() has been called by the panel with the initModel() method before components are added. The issue is that initModel() does not call getDefaultModel() on the parent. This means that when trying to find the parent for resolving a CPM, the wrong CPM may be found because initModel() has not been called for the containing panel.
--
This message was sent by Atlassian JIRA
(v6.2#6252)