Re: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread David Graham
Traditionally you do this: 1. GetMyFormAction determines if it's add or edit from a query string attribute. 2. For edit go get the info from db using the record's id you passed in the query string. 3. Put that info into your form bean. 4. Forward to your form The form's input elements will

Re: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Iain Sanderson
Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject:Re: HOWTO pre-populate forms with data, then update ? Traditionally you do this: 1. GetMyFormAction determines if it's add or edit from a query string attribute. 2. For edit go get the info from db using the record's

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Karr, David
In general, Struts applications will use prepare actions to prepare the data for a form, and process actions to process the submitted data for a form. In your prepare action code, you'll interface with your business logic to obtain the required data, then populate fields of a bean, probably in

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Iain Sanderson
] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:RE: HOWTO pre-populate forms with data, then update ? In general, Struts applications will use prepare actions to prepare the data for a form, and process actions to process the submitted data for a form. In your prepare action code

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Hajratwala, Nayan (N.)
, David [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:48 PM To: Struts Users Mailing List Subject: RE: HOWTO pre-populate forms with data, then update ? In general, Struts applications will use prepare actions to prepare the data for a form, and process actions to process

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Iain Sanderson
- From: Karr, David [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:48 PM To: Struts Users Mailing List Subject: RE: HOWTO pre-populate forms with data, then update ? In general, Struts applications will use prepare actions to prepare the data for a form, and process actions

Re: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Eric Rizzo
Iain Sanderson wrote: David, Thanks for your reply. How do you put the info into the form bean? I use a action called RegistrationUpdateOpenAction to get the data from the database and forward to the view jsp (registrationUpdate.jsp), but I don't know how to put that data into the form bean

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Alberto Corona
ObjectWave Corp. -Original Message- From: Iain Sanderson [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:43 PM To: Struts Users Mailing List Subject: Re: HOWTO pre-populate forms with data, then update ? David, Thanks for your reply. How do you put the info into the form bean

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Hajratwala, Nayan (N.)
, 2003 3:59 PM To: Struts Users Mailing List Subject: RE: HOWTO pre-populate forms with data, then update ? Nayan, Are you accessing the business logic ( or database) in the reset method to determine the initial values? Iain Please respond to Struts Users Mailing List [EMAIL PROTECTED

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Iain Sanderson
PROTECTED]] Sent: Thursday, January 23, 2003 3:59 PM To: Struts Users Mailing List Subject: RE: HOWTO pre-populate forms with data, then update ? Nayan, Are you accessing the business logic ( or database) in the reset method to determine the initial values? Iain Please respond to Struts Users

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Iain Sanderson
Alberto, Perfect. And thanks, I'll give it a try. I'm sure this is what I needed to do. Iain. Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:RE: HOWTO pre-populate forms with data, then update ? You can

Re: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread David Graham
? Won't struts create another one? Iain. Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject:Re: HOWTO pre-populate forms with data, then update ? Traditionally you do this: 1. GetMyFormAction determines if it's add or edit from a query

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Karr, David
- From: Karr, David [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:48 PM To: Struts Users Mailing List Subject: RE: HOWTO pre-populate forms with data, then update ? In general, Struts applications will use prepare actions to prepare the data for a form, and process actions

RE: HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Karr, David
[mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 1:21 PM To: [EMAIL PROTECTED] Subject: Re: HOWTO pre-populate forms with data, then update ? Struts hands you a form bean in your execute method. You cast that variable to your specific form type and use the setters to move data