Oups sorry, its just because when i try to submit dateOfBirth and PlaceOfBirth that are RequiredTextFields was empty.
Sorry.

Gervais a écrit :
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





__________ NOD32 2686 (20071126) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com

Reply via email to