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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / prapanch

this is to tell you in an easily understandable
way.actuallyl in struts when you enter some data in jsp's
you will declare one action form which will act like a
javabean having settes and getters for all the fields in
the jsp. from the object of the action form you can later
retrieve the data enterd by the user.

but here dynaactionform is a smart way to escape coding all
the setters and getters.you can configure the struts-
configfile so that for each and every field in your jsp one
field property will be there in the struts config file.

it will be like this for example your form has username and
password then you need to configure your config file like

<form-beans>
<form-bean name="name of the form" path="fully qualified
name for the class of the form">
<form-property name="username" type="java.lang.String"/>
<form-property name="password" type="java.lang.String"/>
</form-bean>

</form-beans>

by writing this you can avoid writing your action form it
will be useful for you generally when the form fields are
more.

Is This Answer Correct ?    3 Yes 0 No

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

Answer / sandya

Sorry, Im new to Struts. So i didn't get u. if u dont mind
can u please explain once more as understandable way.

Is This Answer Correct ?    2 Yes 0 No

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

Answer / karnakar

if u have number of jsps in ur application,and in evrey jsp
if u have common propertys like <html:username>for this if
u use actin form for every jsp u need to write action
form ,insted of writing actionform,we configure that
properties into dynaaction form ,by doing this we are
reducing time,

Is This Answer Correct ?    1 Yes 0 No

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

Answer / ashok

when you create form beans using xml file instead of coding it in java then this is called DynaAction form

Is This Answer Correct ?    1 Yes 0 No

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

Answer / guest

if u want declare declarative approch for field properites
we can use dynaactionform,
write a class
public class DynaActionServlet(Actionmapping,HttpRequest)
{
dynaactionForm daf=(dynaactionform)af;
---
----
---

Is This Answer Correct ?    2 Yes 2 No

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

Answer / sandya

thanq penchala, is there any modification in action class(if
we use DynaActionForm instead of ActionForm)?

Is This Answer Correct ?    1 Yes 1 No

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

Answer / sekhar

Its a class .which can be used to write the for validations
directly in configuration files.No need to write the
forbeans class while using this class.Directly we can do the
validations in the xml file.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Struts Interview Questions

What is container struts2?

0 Answers  


How many servlet controllers are used in a Struts Application?

0 Answers  


Hi i am murali.i need a excellent answer for the question Tell me about project and project flow ? i mean it is use full to any project,it is on STRUTS

2 Answers  


How data transfered from one formbean to another formbean?

4 Answers  


What is switchaction?

0 Answers  






why we are using vo,dao and dto design patterns in struts framework

3 Answers   Wipro,


What applications use apache struts?

0 Answers  


How an actionform bean is created?

0 Answers  


What is the role of action class?

0 Answers  


If the framework doesn’t do what I want, can I request that a feature be added?

0 Answers  


Are interceptors and filters different?

0 Answers  


Which library is provided by struts for form elements like check boxes, text boxes etc?

0 Answers  


Categories