> Dynamic forms (or
> generating the ActionForm code) keep you out of all sorts of trouble--
> there's nowhere to write the code that you shouldn't be writing. ;)

Never underestimate the fudge-it capacity of the determined hacker. I'd
quite happily subclassed DynaValidatorActionForm to do just that.
Don't worry - I've realised the error of my ways and am moving my code
into actions where it belongs =)
 


-----Original Message-----
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: 19 March 2004 14:58
To: Struts Users Mailing List
Subject: RE: Database backed forms

> From: Brendan Richards [mailto:[EMAIL PROTECTED] 
> However, in most applications I write I don't want to only input data
> but to view and edit existing data as well. For me ActionForms seem to
> be the best way to code an input/output layer between the browser and
> the backend. 
> In order to view and edit existing data, the action form needs to
> pre-populate its data from the backend before displaying the form. 
> How would you suggest implementing view/edit functionality without
> pre-populating action forms?

A LookupDispatchAction with 'create' 'edit' 'update' methods.  In the
'edit' method, you read from the database and prepopulate the form.
I've never gotten the idea that prepopulating forms is frowned upon,
unless you mean doing it *in* the ActionForm.  Dynamic forms (or
generating the ActionForm code) keep you out of all sorts of trouble--
there's nowhere to write the code that you shouldn't be writing. ;)

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to