What is the DynaActionForm? How we implement the
dynaactionform ? can u please tell me the way to implement?
in understandable way?

Answer Posted / penchala

In struts, every form control need to have one ActionForm
class property and getter/setter method for it.
DynaActionForm will replace the ActionForm with the simple
xml mappings so that the java form class can be eliminated
and thus helps in developing the application more quickly.
The advantages of using the DynaActionForm are as follows:-


1. No ActionForm is required.

2. Replace the property mapping with the simple xml file so
that if any property is to add and remove then there is no
need to compile the java class again.


The mapping is to be done in the struts-config.xml file in
the <form-bean> tag for all the form properties.

<form-bean name="inputForm"
type="org.apache.struts.action.DynaActionForm" >
<form-property name="name" type="java.lang.String"/>
<form-property name="email" type="java.lang.String" />
</form-bean>

Is This Answer Correct ?    19 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between forwardaction and includeaction?

525


What is a custom tag?

532


What is the purpose of @result annotation?

616


What is the purpose of @doublerangefieldvalidator?

599


What is used to display the intermediate result in an interceptor?

497






Can you explain struts.properties in struts2?

521


Is struts action class singleton?

541


Which interceptor is responsible for mapping request parameters to action class Java Bean properties?

552


What is the purpose of @validations annotation?

559


How the flow of various requests happens in struts application?

525


Give the details of xml files used in validator framework?

573


What is the purpose of @urlvalidator annotation?

547


How many struts config file in a struts application?

516


Describe validate() and reset() methods.

593


How can duplicate form submission be handled in struts 2?

526