what is diffrence between Dynaactionform,actionform and
Dynavalidateform
Answer Posted / mohd. irfan khan
All three are javaBean Class that can maintain the session
state for web application. The ActionForm object is
automatically populated on the server side with data
entered from a form on the client side.
An ActionForm/DynaValidateForm can have getter(),Setter(),
reset() and the validate() methods that can be defined in
your actionForm or in Action class itself. If any changes
are made to the properties, code need to be recompiled.
Her comes the DynaActionForm to rescue. It allows
properites to be specified in Struts-cofig.xml file there
by avoiding the recompilation of the code.Also there is no
need to have a Form Bean for every page that had getter and
setter method for each of the field on the page.
This is how it can be declared in struts config file:
<form-beans>
<form-bean name="employeeForm"
type="org.apache.struts.action.DynaActionForm">
<form-property name="fname" type="java.lang.String"/>
</form-bean>
</form-beans>
| Is This Answer Correct ? | 25 Yes | 5 No |
Post New Answer View All Answers
Can we have multiple struts config files in a single web app?
Are struts and shocks the same?
How is the mvc design pattern used in struts framework?
What are the major differences between html tags and strut specific html tags?
List some bundled validators?
What is difference between lookupdispatchaction and dispatchaction?
What is the use of namespace in action mapping in Struts2?
How can we integrate log4j in Struts2 application?
How interceptor works in struts 2?
What is the purpose of execute method of action class?
What are the various struts tag libraries?
What is Custom Type Converter in Struts2?
What is an interceptor stack?
What is actioninvocation?
What is the use of execAndWait interceptor?