I have never used GridView myself, but how about putting a CheckGroup around the GridView and then add a Check in the ICellPopulator? Something like this:

public class PojoForTellingWhichChecksHasBeenClicked {
   private Set selectedChecks;
   // Getters and setters
}

PojoForTellingWhichChecksHasBeenClicked pojo = new PojoForTellingWhichChecksHasBeenClicked();
CheckGroup cg = new CheckGroup("checkGroup", new PropertyModel(pojo, "selectedChecks"));
GridView gv = new GridView("gw", SOME_PARAMETERS);
cg.add(gv);

And then a ICellPopulator:

new ICellPopulator() {
   public void populateItem(final Item cellItem, final String componentId, final IModel rowModel) {
      cellItem.add(new Check(componentId, rowModel));
   }
};


Makes sense?

Frank


On 11/9/06, Flemming Seerup < [EMAIL PROTECTED]> wrote:
How do I use CheckBox in a GridView component, and find the seleted in the
onSubmit method ?

/Flemming


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-------------------------------------------------------------------------
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

-------------------------------------------------------------------------
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