Hi, I'm currently trying to work out how to do conditional validation with nested forms. Googling a bit gave me the following suggestion on how to disable a nested form:

(From https://cwiki.apache.org/WICKET/conditional-validation.html)
Form nestedForm = new Form("nestedForm") {
 @Override
  public boolean isEnabled() {
   if (getRootForm().findSubmittingButton() != null) {
    return getRootForm().findSubmittingButton().getForm() == this;
   } else {
    return true;
   }
}

But when I try this with Wicket 1.4.16 I noticed that findSubmittingButton internally calls isEnabledInHierarchy which ends up calling isEnabled so I get stuck in a loop that eventually throws an exception.

So how should one go about working with nested forms if I don't want the nested form to be submitted when the outer form is submitted?

Appreciative of any help,

Regards
Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to