Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is diffrence between Dynaactionform,actionform and
Dynavalidateform

Answers were Sorted based on User's Feedback



what is diffrence between Dynaactionform,actionform and Dynavalidateform..

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

what is diffrence between Dynaactionform,actionform and Dynavalidateform..

Answer / jane priscilla

All three are javaBean Class that can maintain the session
state for web application and the ActionForm object is
automatically populated on the server side with data
entered from a form on the client side. but an
--->ActionForm(DynaValidateForm) can have getters(),Setters
(),reset() and the validator() methods.

--->DynaActionForm should be given in Struts-cofig.xml as
follows
<form-beans>
<form-bean name="employeeForm"
type="org.apache.struts.validator.DynaValidatorForm"
<form-property name="dispatch" type="java.lang.String"/>
</form-bean>
</form-beans>

Is This Answer Correct ?    21 Yes 4 No

what is diffrence between Dynaactionform,actionform and Dynavalidateform..

Answer / ramkiran

In case of the ActionForm user has to write the setters and
getters for every jsp page(request).supoose we have 10
jsps then we have to write10 Action Forms.Dyna Action is a
Generic action form which represents a form.

In DynaActionForm :properties of the form are decided at
the time of deplying the application.

DynaActionForm eliminates this burden and creates the form
bean itself. This way we don't have to write setters and
getters...infact we don't have to give any bean class. To
use DynaAction Form, we have to declare the form bean as a
DynaActionForm Type in struts-config.xml. You will have to
declare the properties and their type too.

Is This Answer Correct ?    7 Yes 2 No

what is diffrence between Dynaactionform,actionform and Dynavalidateform..

Answer / madhukiran

ActionForm will populate the properties depending on the
respective JSP fields.In this we can specify the validate()
method (if required) for validations or else you can use
ActionErrors for validating..

DynaActionForm has to be defined in Struts-config.xml and
it may have many property fields. We can use this form for
many no.of JSPs.Single dynaActionForm can serve for many
number of JSPs.

DyanValidateForm is same as DynaActionForm but we no need
to specify explicitly for the Validations. If we define a
DynaActionForm as DynaValidateForm, then it will look up of
rthe validations.

One more is there DynaValidatorActionForm which will allow
you to specify the path variable of <action> tag in
Validator.xml where as in DynaValidateForm will take
formname.

Is This Answer Correct ?    6 Yes 1 No

what is diffrence between Dynaactionform,actionform and Dynavalidateform..

Answer / labourer in an mnc

ActionForm
This class must be subclassed in order to be instantiated.
Subclasses should provide property getter and setter
methods for all of the bean properties they wish to expose,
plus override any of the public or protected methods for
which they wish to provide modified functionality.

DynaActionForm
Specialized subclass of ActionForm that allows the creation
of form beans with dynamic sets of properties, without
requiring the developer to create a Java class for each
type of form bean.

DynaValidatorForm
This class extends DynaActionForm and provides basic field
validation based on an XML file. The key passed into the
validator is the action element's 'name' attribute from the
struts-config.xml which should match the form element's
name attribute in the validation.xml.

Differences
ActionForm does not create getters and setters like we
cannot write <form-bean name="loginForm"
type="org.apache.struts.action.ActionForm"> in struts-
config.xml.

DynaActionForm cannot be used if we want validation in that
case DynaValidatorForm can be used.

Is This Answer Correct ?    5 Yes 1 No

what is diffrence between Dynaactionform,actionform and Dynavalidateform..

Answer / ram-sd softech

These are form beans which simplfy the process of handling
the forms
Form Beans contains
1. instance variables
2. setters
3. getters
4. reset method
5. validate method
For Action Form the all above 5 properties are manditory
For DynaActionForm above 1,2,3 properties are not needed
(here we provide the information in struts-config.xml)
For DynaValidation Form above 4,5properties are not needed

Is This Answer Correct ?    11 Yes 8 No

what is diffrence between Dynaactionform,actionform and Dynavalidateform..

Answer / a.jyotsna

how we can used setter getter reset and validate() in
struts give one Example.plz soon.

Is This Answer Correct ?    2 Yes 1 No

what is diffrence between Dynaactionform,actionform and Dynavalidateform..

Answer / hazarath kumar

Dynaactionform & actionform have getters & setters and
validates.
ActionForm object is automatically populated on the server
side with data.

Is This Answer Correct ?    3 Yes 10 No

Post New Answer

More Struts Interview Questions

Where should struts xml be placed?

0 Answers  


What does action do in struts?

0 Answers  


while working struts in intellij 7.0error unable to initialize tld location cache: zip file is closed is displayed anybdy can answer me immdialy .ungert

0 Answers   Banking,


What is action support class in struts2?

0 Answers  


What are the two scope types for formbeans?

0 Answers  


Is Struts Action class Thread Safe?

14 Answers   Wipro,


How many instances of servlet usually run in a struts application ?

0 Answers  


What types of Actions we have in Struts?

3 Answers   TCS,


What is struts and springs in java?

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 the purpose of global-forwards tag in struct-config.xml?

0 Answers  


in struts without integrate hibernate how to use directly explain?

1 Answers   HCL,


Categories