You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Jean-Baptiste Quenot <jb...@apache.org> on 2006/11/29 11:11:01 UTC
Adding a [ModalWindow containing a Form] to a Form
Hi,
When developing a ModalWindow containing a Form, one has to ensure
that the ModalWindow is not added itself inside a Form, otherwise
we end up with nested Forms and that doesn't work, at least in
1.2.3.
Is it supposed to work in branch 1.x? If not, maybe ModalWindow
should check component hierarchy and throw an exception in the
case of nested forms.
WDYT?
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/
Re: Adding a [ModalWindow containing a Form] to a Form
Posted by Matej Knopp <ma...@knopp.sk>.
I'm not sure.
I don't know if we can do something like this for 1.2.x, as it's only a
"bugfix" branch.
For 1.x I think it would be much better to backport nested forms support
from trunk then just throw exceptions.
-Matej
Jean-Baptiste Quenot wrote:
> * Matej Knopp:
>
>> Why should we do that check? We don't check for nested forms,
>> why should modal dialog be an exception?
>
> You're right. But when doing this type of mistake, it takes
> several hours to figure out what is going on. The ModalWindow
> just needs to be added outside of the Form.
>
> What about adding a check for nested forms? Generally speaking?
> And also checking that there is a Form in the page when using form
> components? This is also a common mistake.
Re: Re: Adding a [ModalWindow containing a Form] to a Form
Posted by Martijn Dashorst <ma...@gmail.com>.
On 11/29/06, Jean-Baptiste Quenot <jb...@apache.org> wrote:
> * Matej Knopp:
>
> > Why should we do that check? We don't check for nested forms,
> > why should modal dialog be an exception?
>
> You're right. But when doing this type of mistake, it takes
> several hours to figure out what is going on. The ModalWindow
> just needs to be added outside of the Form.
No not necessarily. Nested forms work for 2.0 and will/should for 1.3.
> What about adding a check for nested forms? Generally speaking?
> And also checking that there is a Form in the page when using form
> components? This is also a common mistake.
Form components can perfectly live outside forms. Ajax update
behaviors, want on selection change are examples where this is valid.
It is not that common to forget it IMO, and when that happens, it is a
mistake you make just once.
Martijn
--
<a href="http://www.thebeststuffintheworld.com/vote_for/wicket">Vote</a>
for <a href="http://www.thebeststuffintheworld.com/stuff/wicket">Wicket</a>
at the <a href="http://www.thebeststuffintheworld.com/">Best Stuff in
the World!</a>
Re: Adding a [ModalWindow containing a Form] to a Form
Posted by Jean-Baptiste Quenot <jb...@apache.org>.
* Matej Knopp:
> Why should we do that check? We don't check for nested forms,
> why should modal dialog be an exception?
You're right. But when doing this type of mistake, it takes
several hours to figure out what is going on. The ModalWindow
just needs to be added outside of the Form.
What about adding a check for nested forms? Generally speaking?
And also checking that there is a Form in the page when using form
components? This is also a common mistake.
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/
Re: Adding a [ModalWindow containing a Form] to a Form
Posted by Matej Knopp <ma...@knopp.sk>.
Why should we do that check? We don't check for nested forms, why should
modal dialog be an exception?
Btw. Nested forms should work for 2.0 (trunk).
-Matej
Jean-Baptiste Quenot wrote:
> Hi,
>
> When developing a ModalWindow containing a Form, one has to ensure
> that the ModalWindow is not added itself inside a Form, otherwise
> we end up with nested Forms and that doesn't work, at least in
> 1.2.3.
>
> Is it supposed to work in branch 1.x? If not, maybe ModalWindow
> should check component hierarchy and throw an exception in the
> case of nested forms.
>
> WDYT?