An ActionForm holds form data submitted from a request. As a developer you extend the ActionForm class and provide your own implementation of it. You have to physically write get()/set() methods for each of the attributes you are collecting from the form.
A DynaActionForm is a declarative model. With a DynaActionForm you declare the attributes you are collecting from the web form as an XML declaration in the struts-config.xml. DynaActionForms work well if you are just collecting data and using the basic validation rules that come with the Validator framework.
They are easy to setup and you can add/remove attributes without having to modify your code. I hope that answers your question.
John Carnell<br />Principal Architect<br /> <br />Netchange, LLC<br />1161 HillCrest Heights<br />Green Bay, WI 54313<br /> <br />firstname.lastname@example.org<br /> <br /> <br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/159059228X/ref=jranch-20" target="_blank" rel="nofollow">Pro Jakarta Struts, Second Edition</a>
Joined: May 11, 2004
Ya that has very much answered my question. Thanks for the prompt reply. But can you tell me is the validation framework also declarative, that is I do not have to write the validate method.
Surely it must be otherwise where will we write a validate method as we are not writing the ActionForm classes. But then does it support Regular Expressions and what about complex validations.