Hi all,

I have this form component :

   public class RegistrationForm extends Form {
private final static long serialVersionUID = 1l;

       public RegistrationForm(String id, StudentFolder studentFolder) {
           super(id, new CompoundPropertyModel(studentFolder));
           add(new RequiredTextField("student.firstName"));
           add(new RequiredTextField("student.lastName"));
           add(new RequiredTextField("student.dateOfBirth"));
           add(new RequiredTextField("student.placeOfBirth"));
/*super(id);
           add(new RequiredTextField("student.firstName",new
   Model("fname")));
           add(new RequiredTextField("student.lastName",new
   Model("lname")));
           add(new RequiredTextField("student.dateOfBirth",new
   Model("dob")));
           add(new RequiredTextField("student.placeOfBirth",new
   Model("pob")));*/
       }

       protected void onSubmit() {
           for ( int i=0; i<20; i++)
              System.out.println("");
System.out.println(">>>>> submit"); for ( int i=0; i<20; i++)
              System.out.println("");
} }

With the usage of CompounPropertyModel the content of onSubmit() never run. But if i comment the usage of compoundPropertyModel and use Static model it work.

Can you help me ?

Thanks


Reply via email to