Hi,

Sorry, posted the previous one by error, this is what's missing in the code:


class APanel extends Panel(){
private List<B> selectedBs;
public APanel(){
    A a = getA();
    List<B> choices = getBChoices();
    cbmc = new CheckBoxMultipleChoice("id", choices);
    cbmc.setModel(new PropertyModel(this, selectedBs));
    Form f = new Form("form"){
        onSubmit(){
              List<AB> abs = a.getAB();
              abs.removeAll();
              for (B b : selectedBs){
                     AB ab = new AB(a, b);
                     abs.add(ab);
              }
              // a contains properly initialized ab elements
        }
    }
    f.add(cbmc);
}

Question is, does 'selectedBs' get serialized in pageMaps ? If so, I suppose
it would be better to store only selectedB's id's...

Thanks, and sorry again for the double-posting inconvenience !
Xavier

Reply via email to