Great!! It works ok! Thank you very much.
On Tue, Dec 20, 2011 at 6:21 AM, Andrea Del Bene <adelb...@ciseonweb.it>wrote: > This should not be a big deal. Wicket lets you put form submitting button > outside form itself. All you have to do to make it work is to pass the form > to component's constructor. > > > HTML code: > > > <form wicket:id="form1"> > > </form> > > <form wicket:id="form2"> > <input type="submit" value="form2" wicket:id="submit2"/> > > </form> > > <input type="submit" value="form1" wicket:id="submit1"/> > > > Java code: > > > > add(form1 = new Form("form1"){ > @Override > protected void onSubmit() { > super.onSubmit(); > System.out.println("form1"); > } > }); > > add(new SubmitLink("submit1", form1)); > > Form form2; > > add(form2 =new Form("form2"){ > @Override > protected void onSubmit() { > super.onSubmit(); > System.out.println("form2"); > } > }); > > form2.add(new SubmitLink("submit2")); > > > > Button "submit1" is outside its form and you have two separated form. > > > > I think you are right. >> Using an AjaxButton it works a litle more like I want. >> >> Nevertheless I still have a problem, because outer form submits inner >> form. >> >> In my case I think that I need two separated forms, but the problem is how >> to put add button y save button in the correct place. I mean, the layout >> is >> what you mentioned but the behavior is more like two separated forms. >> Thank you! >> >> On Mon, Dec 19, 2011 at 2:04 PM, Andrea Del Bene<adelb...@ciseonweb.it>** >> wrote: >> > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org> > For additional commands, e-mail: users-h...@wicket.apache.org > >