Hi all,

I have a simple Form that contains a DropDownChoice. I have a submit button
and a submit link to change part of the form based on the option selected in
the DropDownChoice.

What it is happening is that because of some fields are invalid (Empty) I
cannot get to the selected option of the DropDownChoice, and by that change
part of the form.


final AjaxSubmitLink cDetailedForm = new AjaxSubmitLink("DetailedForm") {
         public void onSubmit(AjaxRequestTarget target, Form form) {
            showHideDetailsOnForm(target);
         }
         public void onError(AjaxRequestTarget target, Form form) {
            showHideDetailsOnForm(target);
         }
      };

private void showHideDetailsOnForm(){

String option = ((Map)getModel().getObject()).get("DetailsChoices");

if(option.equals("2")){



}

.....etc.

}

As the form validation fails, I cannot get to the model.  If I set
DefaultFormProcessing to false it doesn't submit it either.


Question Time:

Is there a way to set validations to buttons or submit elements in
particular?

Ex. If I click the button named "SubmitAndValidateAll" some validations are
executed and if I click the button named "SubmitButDontValidateAge" some
not...


f(t)

Reply via email to