Thanks Igor,

Replacing ListView with PropertyListView did the trick. I missed the 
obvious fact that the list item's model should also be a 
CompoundPropertyModel.

I tried to reproduce the parent-structure problem. But I can't, so I 
must have seen something else there. Sorry for that.

If did see something else, if you look at Component#initModel there is a 
for loop that iterates up to the root of the component hierarchy. In the 
loop body Component#getModel is called. Note however that getModel will 
potentially recursively call initModel again. Is this intentional? This 
will work of course, but it looks like both a loop and recursion is 
redundant and could (in some corner cases) cause unexpected behavior.

Regards,
     Erik.

Igor Vaynberg wrote:
> are you sure the parent of the listitem is really the page, i find 
> that unlikely.
>
> but your code wouldnt work either way
>
> you are adding the label without a model to the listitem. when the 
> label renders it is going to look for the first component in its 
> upwards hierarchy with the compound model, and what it should find is 
> the panel with the person compound property model. then it is going to 
> try to find [ person.street] property and fail.
>
> to fix this you need to make the listitem's model compound as well. 
> the easiest way is to  extend PropertyListView instead of ListView
>
> makes sense?
>
> -igor

-- 
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to