Re: Forms across multiple panels
I know this thread hasn't been active for a while but I thought I'd ask. How can one perform form field validation if the form fields are inside the panels contained in the forms? The form itself will not now what fields are contained in the panels. Thanks in advance, Lucas -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Forms-across-multiple-panels-tp2067607p3611293.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Forms across multiple panels
How can one perform form field validation if the form fields are inside the panels contained in the forms? Extend FormComponentPanel instead of Panel. That deals with the nesting. - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms across multiple panels
Panels are on same web-page? ** Martin 2010/4/27 Steven Haines lyg...@yahoo.com: Hi, The application I'm building is composed of several panels, each contained in its own div. The panels are logical groupings of data, handle different Ajax requests, and so forth. My challenge is that when a user completes the process by entering data into all of the panels, I want to submit the form data from all of the panels into a single form submit. Or written a different way, I do not want to have to submit each panel individually, I want a single submission. What is the best way to do this? Thanks Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms across multiple panels
Sorry, yes, I have a MasterPage HTML and Java combination that hosts the divs, so something like this: Java: public class MasterPage extends WebPage ... MyObject myobject = new MyObject(); add( new Panel1( panel1, myobject ) ); add( new Pane2( panel2, myobject ) ); ... HTML: ... div wicket:id=panel1/div div wicket:id=panel2/div ... So conceivably I could create a form object on the MasterPage... - Original Message From: Martin Makundi martin.maku...@koodaripalvelut.com To: users@wicket.apache.org; Steven Haines lyg...@yahoo.com Sent: Tue, April 27, 2010 10:08:06 AM Subject: Re: Forms across multiple panels Panels are on same web-page? ** Martin 2010/4/27 Steven Haines lyg...@yahoo.com: Hi, The application I'm building is composed of several panels, each contained in its own div. The panels are logical groupings of data, handle different Ajax requests, and so forth. My challenge is that when a user completes the process by entering data into all of the panels, I want to submit the form data from all of the panels into a single form submit. Or written a different way, I do not want to have to submit each panel individually, I want a single submission. What is the best way to do this? Thanks Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms across multiple panels
Hi! Yes.. you could have: form panel 1/ panel 2/ submit-button/ /form ** Martin 2010/4/27 Steven Haines lyg...@yahoo.com: Sorry, yes, I have a MasterPage HTML and Java combination that hosts the divs, so something like this: Java: public class MasterPage extends WebPage ... MyObject myobject = new MyObject(); add( new Panel1( panel1, myobject ) ); add( new Pane2( panel2, myobject ) ); ... HTML: ... div wicket:id=panel1/div div wicket:id=panel2/div ... So conceivably I could create a form object on the MasterPage... - Original Message From: Martin Makundi martin.maku...@koodaripalvelut.com To: users@wicket.apache.org; Steven Haines lyg...@yahoo.com Sent: Tue, April 27, 2010 10:08:06 AM Subject: Re: Forms across multiple panels Panels are on same web-page? ** Martin 2010/4/27 Steven Haines lyg...@yahoo.com: Hi, The application I'm building is composed of several panels, each contained in its own div. The panels are logical groupings of data, handle different Ajax requests, and so forth. My challenge is that when a user completes the process by entering data into all of the panels, I want to submit the form data from all of the panels into a single form submit. Or written a different way, I do not want to have to submit each panel individually, I want a single submission. What is the best way to do this? Thanks Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms across multiple panels
Okay, I'm working on it, here is a followup question: how do I add a panel to a form? Here's where I'm stuck. Here is my HTML with my panels embedded inside my form: form wicket:id=myForm id=myForm div id=panelOne wicket:id=panelOnePanel One/div div id=panelTwo wicket:id=panelTwoPanel Two/div div id=panelThree wicket:id=panelThreePanel Three/div div id=panelFour wicket:id=panelFourPanel Four/div /form But how do I build the object hierarchy? The following fails because obviously the hierarchy is wrong (the panels are children of the form), but the Form class does not have an add() method to accept Panels.. final MyForm myForm = new MyForm(); final FormMyForm form = new FormMyForm( myForm, new CompoundPropertyModelMyForm( myForm ) ); add( new PanelOne( panelOne ), form ); add( new PanelTwo( panelTwo ), form ); add( new PanelThree( panelThree ), form ); add( new PanelFour( panelFour ), form ); add( form ); Should I make all of the panels implement IFormValidator so that I can make them match the page hierarchy? Or do you have any other more elegant suggestions? Thanks Steve - Original Message From: Martin Makundi martin.maku...@koodaripalvelut.com To: users@wicket.apache.org; Steven Haines lyg...@yahoo.com Sent: Tue, April 27, 2010 10:18:13 AM Subject: Re: Forms across multiple panels Hi! Yes.. you could have: form panel 1/ panel 2/ submit-button/ /form ** Martin 2010/4/27 Steven Haines lyg...@yahoo.com: Sorry, yes, I have a MasterPage HTML and Java combination that hosts the divs, so something like this: Java: public class MasterPage extends WebPage ... MyObject myobject = new MyObject(); add( new Panel1( panel1, myobject ) ); add( new Pane2( panel2, myobject ) ); ... HTML: ... div wicket:id=panel1/div div wicket:id=panel2/div ... So conceivably I could create a form object on the MasterPage... - Original Message From: Martin Makundi martin.maku...@koodaripalvelut.com To: users@wicket.apache.org; Steven Haines lyg...@yahoo.com Sent: Tue, April 27, 2010 10:08:06 AM Subject: Re: Forms across multiple panels Panels are on same web-page? ** Martin 2010/4/27 Steven Haines lyg...@yahoo.com: Hi, The application I'm building is composed of several panels, each contained in its own div. The panels are logical groupings of data, handle different Ajax requests, and so forth. My challenge is that when a user completes the process by entering data into all of the panels, I want to submit the form data from all of the panels into a single form submit. Or written a different way, I do not want to have to submit each panel individually, I want a single submission. What is the best way to do this? Thanks Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Forms across multiple panels
Scratch that, the Form has an add() method that accepts a Component and a Panel is a component, netbeans is just being weird... Thanks - Original Message From: Steven Haines lyg...@yahoo.com To: users@wicket.apache.org Sent: Tue, April 27, 2010 12:17:04 PM Subject: Re: Forms across multiple panels Okay, I'm working on it, here is a followup question: how do I add a panel to a form? Here's where I'm stuck. Here is my HTML with my panels embedded inside my form: form wicket:id=myForm id=myForm div id=panelOne wicket:id=panelOnePanel One/div div id=panelTwo wicket:id=panelTwoPanel Two/div div id=panelThree wicket:id=panelThreePanel Three/div div id=panelFour wicket:id=panelFourPanel Four/div /form But how do I build the object hierarchy? The following fails because obviously the hierarchy is wrong (the panels are children of the form), but the Form class does not have an add() method to accept Panels.. final MyForm myForm = new MyForm(); final FormMyForm form = new FormMyForm( myForm, new CompoundPropertyModelMyForm( myForm ) ); add( new PanelOne( panelOne ), form ); add( new PanelTwo( panelTwo ), form ); add( new PanelThree( panelThree ), form ); add( new PanelFour( panelFour ), form ); add( form ); Should I make all of the panels implement IFormValidator so that I can make them match the page hierarchy? Or do you have any other more elegant suggestions? Thanks Steve - Original Message From: Martin Makundi martin.maku...@koodaripalvelut.com To: users@wicket.apache.org; Steven Haines lyg...@yahoo.com Sent: Tue, April 27, 2010 10:18:13 AM Subject: Re: Forms across multiple panels Hi! Yes.. you could have: form panel 1/ panel 2/ submit-button/ /form ** Martin 2010/4/27 Steven Haines lyg...@yahoo.com: Sorry, yes, I have a MasterPage HTML and Java combination that hosts the divs, so something like this: Java: public class MasterPage extends WebPage ... MyObject myobject = new MyObject(); add( new Panel1( panel1, myobject ) ); add( new Pane2( panel2, myobject ) ); ... HTML: ... div wicket:id=panel1/div div wicket:id=panel2/div ... So conceivably I could create a form object on the MasterPage... - Original Message From: Martin Makundi martin.maku...@koodaripalvelut.com To: users@wicket.apache.org; Steven Haines lyg...@yahoo.com Sent: Tue, April 27, 2010 10:08:06 AM Subject: Re: Forms across multiple panels Panels are on same web-page? ** Martin 2010/4/27 Steven Haines lyg...@yahoo.com: Hi, The application I'm building is composed of several panels, each contained in its own div. The panels are logical groupings of data, handle different Ajax requests, and so forth. My challenge is that when a user completes the process by entering data into all of the panels, I want to submit the form data from all of the panels into a single form submit. Or written a different way, I do not want to have to submit each panel individually, I want a single submission. What is the best way to do this? Thanks Steve - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org