HOWTO pre-populate forms with data, then update ?

2003-01-23 Thread Iain Sanderson
Newbie question: I've managed to use Struts forms as a means of initial data entry ( registration forms etc) but have got stuck on how to use a form to update data that already exists in a database. For example, a form where a user can update their user details (address, email etc) and then

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

2003-01-23 Thread David Graham
will be prepopulated with data for the edit screen. David From: Iain Sanderson [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: HOWTO pre-populate forms with data, then update ? Date: Thu, 23 Jan 2003 15:20:40 -0500 Newbie question: I've

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
putting most of this bean data into the session scope. -Original Message- From: Iain Sanderson [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 12:21 PM To: [EMAIL PROTECTED] Subject: HOWTO pre-populate forms with data, then update ? Newbie question: I've managed to use

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