hi rajagopal,
dynaforms are useful for putting something together quickly, but I find them less useful than hardcoded form classes sometimes, especially if there are many form fields.


The way to access some data from the form submit in your action is usually so for a dynaform:

addressDTO.setLine3((String) accommForm.get("line3"));

and for a hard-coded formbean:

addressDTO.setLine3(accommForm.getLine3());

If find that the hard-coded formbean is easier to code with in IDEs like Eclipse, due to better auto-completion, less room for typo mistakes etc.

hth
Adam

On 11/05/2004 06:32 AM Y, Rajagopal wrote:
Ok...Fine..
In DynaActionForm we create all properteis in configuration file. and the default scope of the form is session(i believe). if we have a form
that is created dynamically on the first page (Say only 2 fields (name &
Pwd)), isn't it overhead to carry the object which contains field properties which is not required for the
particular form?


Hope i am clear what i mean !!!

Can u pls clear my doubt...

Regds
Rajagopal



-----Original Message-----
From: Koushik [mailto:[EMAIL PROTECTED]
Sent: Friday, November 05, 2004 11:59 AM
To: Struts Users Mailing List
Subject: Re: Struts Best Practices


With the help of DynaActionForm u can create your form dynamically. for example if u r building a Purchase Order form where there are multiple line items,the above is best suitable to dynamically generate your form



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



Reply via email to