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

Why was reload removed from struts (since 1.1)?

0 Answers  


Hi Friends, why struts introduced in to web application. Plz dont send any links . Need main reason for implementing struts. Thanks Prakash

4 Answers  


What is apache struts vulnerability?

0 Answers  


What does action do in struts?

0 Answers  


How to pass runtime Parameter in Struts1.2?

2 Answers  






How does interceptor work in struts2?

0 Answers  


What are action errors and error and what are the consequences they impose?

0 Answers  


What is the purpose of execute() method?

0 Answers  


What is the purpose of @key annotation annotation?

0 Answers  


What are the steps involved in creating a strut application?

0 Answers  


Hi Friends, am new to struts.I read that " you can store variables in xml file(properties file) and for future enhancements we just call properties file . Now i want to implement this , where can i call properties file to enhance my application. My question is where this properties file will be called.

1 Answers  


kindly can any one post for me portlet,hibernate,spring example code and configuration,and some related tutorials plz its urgent for me....thanks in advance ............

1 Answers  


Categories