Maybe it's just late, but I can't seem to answer this question myself.
Will each model object in my list exist after the request has finished
with the following code, assuming that the list is wrapped in a
detachable model:

final PageableListView list = new PageableListView("rows", data, 10)
{
         public void populateItem(final ListItem listItem)
         {
                  final MyObject value = (MyObject) listItem.getModelObject();
                  listItem.add(new Link("sjs") {
                                public void onClick() {
                                         System.out.println(value.getName());
                                }
                  });
         }
};

or how about this:

final PageableListView list = new PageableListView("rows", data, 10)
{
         public void populateItem(final ListItem listItem)
         {
                  final MyObject value = (MyObject) listItem.getModelObject();
                  final String name = value.getName();
                  
                  listItem.add(new Link("sjs") {
                                public void onClick() {
                                         System.out.println(name);
                                }
                  });
         }
};


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to