Ok, thanks.

Igor Vaynberg wrote:
>
>
> On 7/3/07, *Nino Saturnino Martinez Vazquez Wael* 
> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi
>
>     I have this setup:
>
>     ListView blockContainer = new ListView("blockContainer", model) {
>                 protected void populateItem(ListItem item) {
>                                  item.getModelObject ();
>                                   more code...
>                                 }
>     I've experienced some what I belive unexpected behavior here. So I'll
>     try to explain what I expect should happen when iterating trough the
>     listview.
>
>     In the above example, I would expect the following
>
>        1. listview should to call model.getObject to retrieve the list
>     that
>           it should iterate over.
>        2. item.getModelObject should give me the current items
>     modelObject
>
>     These two points are also what happens but its the way that they
>     seem to
>     be implemented that are odd.
>
>     It looks like  when calling item.getModelObject this is what happens:
>     model.getObject.get(iterationnumber), I would have expected
>     listview to
>     extract the list only once?
>
>
> no, listview doesnt cache the list. but the model can do so. so if you 
> use loadabledetachablemodel() then your list is only extracted once, 
> and then cached by the model for the duration of the request.
>
> there are never contracts on how often a component will call 
> getobject() on the model.
>
> -igor
>
>
>  
>
>     regards Nino
>
>
>
>     -------------------------------------------------------------------------
>     This SF.net email is sponsored by DB2 Express
>     Download DB2 Express C - the FREE version of DB2 express and take
>     control of your XML. No limits. Just data. Click to get it now.
>     http://sourceforge.net/powerbar/db2/
>     _______________________________________________
>     Wicket-user mailing list
>     Wicket-user@lists.sourceforge.net
>     <mailto:Wicket-user@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to