On 10/30/06, Erik van Oosten <[EMAIL PROTECTED]> wrote:
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.

we have to do that because both getModel() and initModel() are nonfinal. so yes, there are cases where you can do something weird, but it will be a user error because you overrode one or both of those and did not do it properly.

i dont really think there is much we can do about that.
 
-igor


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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to