Hi Johan,

the idea of me was that the outer form extends the inner - as this is closes
to what happens in html. So yo still can process the inner one, as is a
complete form, but when the outer one is processed, the inner onSubmit etc.
is overriden and therefore no other misunderstandings and errors should
occur. This is also closest to the html form that is coming out - the inner
one can be processed, but if you do the outer one then the inner is
processed too (in case of formouter extends form inner) and solely processed
in case of outer form doenst extend inner form.

that is should be 2 seperate form is ok, if the developer wants to tread
them seperately, if he wants to tread them together, he may use the outer
extending the inner. Sounds quite basic and easy to me.

Regards

Korbinian


> -----Ursprüngliche Nachricht-----
> Von: Johan Compagner [mailto:[EMAIL PROTECTED] 
> Gesendet: Samstag, 4. November 2006 23:02
> An: [email protected]
> Betreff: Re: AW: Nested forms
> 
> what do you mean extend the inner form? as in java extend?
> Why should you do that as developer. then just have one form. 
> What does that inner do then?
> 
> It should be just 2 seperate forms (on the java side) and if 
> possible we should know what button (so what form) is 
> submitted so that only one is processed The other should keep 
> the rawinput for the next render.
> 
> johan
> 
> 
> On 11/4/06, Korbinian Bachl <[EMAIL PROTECTED]> wrote:
> >
> > hmm.. I like that idea. If this is a wicket only thing, you 
> might want 
> > to let the programmer decide what should be  happening.. 
> perhaps the 
> > outer form has to extend the inner one if it should be  act 
> like 1 big 
> > form, if you dont extend it, they are acting as 2 own forms instead?
> >
> > Regards
> >
> > > -----Ursprüngliche Nachricht-----
> > > Von: Matej Knopp [mailto:[EMAIL PROTECTED]
> > > Gesendet: Samstag, 4. November 2006 18:38
> > > An: [email protected]
> > > Betreff: Re: AW: Nested forms
> > >
> > > Indeed, nesting html forms it not allowed. Therefore we 
> have nested 
> > > forms support in 2.0. If you nest form copmonents, the 
> inner <form 
> > > tags will be replaced by <div>s.
> > >
> > > When the inner form is submitted, it actually means 
> submitting the 
> > > outerform, but only the fieds from inner form will be 
> validated and 
> > > updated.
> > >
> > > -Matej
> > >
> > > Korbinian Bachl wrote:
> > > > Emm, Martinj,
> > > >
> > > > im not sure but as far as I know, nested forms are not 
> allowed in 
> > > > HTML3, 4 and XHTML 1.0 and 1.1. Furthermore, as its not allowed 
> > > > you dont know what the browser will do.
> > > >
> > > > Regards
> > > >
> > > >> -----Ursprüngliche Nachricht-----
> > > >> Von: Martijn Dashorst [mailto:[EMAIL PROTECTED]
> > > >> Gesendet: Samstag, 4. November 2006 17:49
> > > >> An: Wicket Development
> > > >> Betreff: Nested forms
> > > >>
> > > >> I was surprised to see the nested forms working, but I have a 
> > > >> question on what happens with the inner form inputs when the 
> > > >> outer form is
> > > >> submitted:
> > > >>
> > > >> <form wicket:id="outer">
> > > >>     <input type="text" wicket:id="field" />
> > > >>     <form wicket:id="inner">
> > > >>         <input type="text" wicket:id="field" />
> > > >>         <input type="submit" wicket:id="innerSave" />
> > > >>     </form>
> > > >>     <input type="submit" wicket:id="outerSave" /> </form>
> > > >>
> > > >> public class MyPage extends WebPage {
> > > >>     private String inner;
> > > >>     private String outer;
> > > >>
> > > >>     public MyPage() {
> > > >>         Form outer = new Form(this, "outer");
> > > >>         new TextField(outer, "field", new PropertyModel(this, 
> > > >> "outer"));
> > > >>         Form inner = new Form(outer, "inner");
> > > >>         new TextField(inner, "field", new PropertyModel(this, 
> > > >> "inner"));
> > > >>         new Button(outer, "outerSave") {};
> > > >>         new Button(inner, "innerSave") {};
> > > >>     }
> > > >> }
> > > >>
> > > >> If the user clicks the inner button, only the inner fields are 
> > > >> processed.
> > > >>
> > > >> If the user clicks the outer button, both the inner and
> > > outer fields
> > > >> are processed, but the inner forms 'onSubmit' is not called.
> > > >>
> > > >> Two questions:
> > > >>  1. should the inner fields be processed and update 
> their models?
> > > >>  2. should the inner onSubmit/onError be called when 
> the outer is 
> > > >> submitted?
> > > >>
> > > >> 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>
> > > >>
> > > >
> > > >
> > >
> > >
> >
> >
> 

Reply via email to