The advantages?

Having all fields in page preserved with validating just the fields I'm interested in with no effort.

Component don't need to care whether there are put in a form or not. You can place a form in your component and don't care whether it would break html or not.

You can put a form in your base page and submitting every inner form would preserve the values entered in other forms (without validating them). And you (as developer) would get this behavior for free. This is something not trivial to do with wicket, while automatically supported by e.g. jsf (postback).

-Matej



Eelco Hillenius wrote:
I'm not sure whether I like the idea at all tbh. In what situation -
other than developer laziness - would this be a great advantage? We
would be supporting something that HTML doesn't support, meaning that
we unleash magic to make it work, and don't think I like nested forms
conceptually either.

But maybe I just need to see a good use case explained :)

Eelco


On 10/10/06, Matej Knopp <[EMAIL PROTECTED]> wrote:
Couple of weeks ago Martijn mentioned the idea of nested forms. What
would that mean?

It would allow us to put Form inside other Form. The inner form(s) would
be rendered as div. Outer form would get submitted, but only the inner
form (the one IFormSubmittingComponent.getForm() returns) would be
validated.

I really like this idea, although there are several things to be considered:

a) it would break stylesheets. The inner form will no longer be rendered
as <form, it will be rendered as <div

b) it won't fire onsubmit from the inner form even though
Button.shouldInvokeJavascriptFormOnsubmit returns true. Anyway, is
anyone using this? Sounds a bit like hack to me, because only button and
submit link support that.

WDYT?

-Matej



Reply via email to