Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Info

This page should serve as a "specification" (aka nominal state, not the current state) on nested form handling.
Please review the various situations and correct any mistakes or add new situations if necessary.
Thanks, Gerolf

Info

The Conditional Validation page contains some practical examples regarding nested forms and validation.

Info

It might be a good idea to use input instead of button elements in your form hierarchy. IE tends to send all button values, making it difficult to establish the one used to submit.

Code Block
titleMarkup
<form wicket:id="outer">
  <form wicket:id="middle">
    <form wicket:id="inner">
    </form>
  </form>
</form>
Panel
titleLegend

form...enabled
form...disabled

form...submitted form with no errors
form...form with errors

E...onError called
S...onSubmit called
_...nothing called, but input is preserved

Info
titleNotice

When submitting a nested form, the entire <form> is submitted (including fileuploads), but processed according to the rules below.

Div
styleborder:1px solid;

all forms enabled
outer form submitted

Outer

Middle

Inner

S

S

S

Div
styleborder:1px solid;

all forms enabled
middle form submitted

Outer

Middle

Inner

_

S

S

Div
styleborder:1px solid;

all forms enabled
inner form submitted

Outer

Middle

Inner

_

_

S

Div
styleborder:1px solid;

middle form disabled
outer form submitted

Outer

Middle

Inner

S

_

_

Div
styleborder:1px solid;

inner form disabled
outer form submitted

Outer

Middle

Inner

S

S

_

Div
styleborder:1px solid;

outer form disabled
outer form submitted

Outer

Middle

Inner

_

_

_

Div
styleborder:1px solid;

all forms enabled
middle form has error
outer form submitted

Outer

Middle

Inner

E

E

_

Div
styleborder:1px solid;

all forms enabled
middle form has errors
middle form submitted

Outer

Middle

Inner

_

E

_

Div
styleborder:1px solid;

all forms enabled
inner form has errors
middle form submitted

Outer

Middle

Inner

_

E

E

Div
styleborder:1px solid;

middle form disabled
outer form has errors
outer form submitted

Outer

Middle

Inner

E

_

_

Div
styleborder:1px solid;

all forms enabled
inner form has errors
outer form submitted

Outer

Middle

Inner

E

E

E

Div
styleborder:1px solid;

middle form disabled
inner form has (*potential) errors
outer form submitted

Outer

Middle

Inner*

S

_

_