Can you submit all of the data on a form based on an onchange event?
 
Is adding javascript the only way to submit the data?
 
Pseudo Code:
 
Panel {
 
  Form form = new Form(new CompoundPropertyModel());
  add(form);
  form.add(new TextField("val");
  form.add(childList = new DropDownChoice()); 
  childList.add( new AjaxFormComponentUpdatingBehavior("onchange") {


      protected void onUpdate( final AjaxRequestTarget target ) {

           /// Tried clearing the messages here, does not work.         

          Line12: form.getObjectModel().setVal("Hello");
target.addComponent(panel);

           target.addComponent(form);

      }

  });
 
  form.add(new MyValidator());
  form.add(new AjaxSubmitLink(form)) {
       
     onSubmit() {
        save();
        moveToNextScreen();
     }
   
  }
  
 
}
        
 
 
Berlin Brown

Reply via email to