Igor, Regarding your suggestions below:
> > class mypage extends page { > > private Set<Person> selected=new HashSet(); > > > > private class PersonCheckboxModel implements IModel<Boolean> { > > private final IModel<Person> person; > > public final PersonCheckBoxModel(IModel<Person> person) { > > this.person=person; } > > > > public Boolean getObject() { > > return selected.contains(person.getObject()); > > } > > > > public void setObject(Boolean b) { > > if (Boolean.TRUE.equals(b)) { > > selected.put(person.getObject()); > > } else { > > selected.remove(person.getObject()); > > } > > } > > > > public void detach() { person.detach(); } > > } > > > > } > > > > now all you have to do is > > > > LoadableDetachableModel person=new LoadalbeDetachableModel(id); > > new CheckBox(this, "cb", new PersonCheckBoxModel(person)); > > > > and everything magically works, hope it gives you some ideas. Yes, it does indeed give me many ideas. Right now, I'm trying to figure out the implementation details. While stepping through the code, I noticed that the setObject() method of my IModel never gets called. When is this _supposed_ to be set, and why would it not be called in my case? Cheers, David ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user