GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Struts
Go To First  |  Previous Question  |  Next Question 
 Struts  |  Question 4 of 102    Print  
What is the difference between ActionForm and DynaActionForm

  
Total Answers and Comments: 11 Last Update: November 11, 2008   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
March 18, 2005 15:21:38   #1  
vamshi        

RE: What is the difference between ActionForm and DynaActionForm
In struts 1.0, action form is used to populate the html tags in jsp using struts custom tag.when the java code changes, the change in action class is needed. To avoid the chages in struts 1.1 dyna action form is introduced.This can be used to develop using xml.The dyna action form bloats up with the struts-config.xml based definetion.
 
Is this answer useful? Yes | No
July 13, 2005 06:50:22   #2  
jagadish kumar        

RE: What is the difference between ActionForm and DynaActionForm
There is no need to write actionform class for the DynaActionForm and all the variables related to the actionform class will be specified in the struts-config.xml 
where as we have to create Actionform class with getter and setter methods which are to be populated from the form

 
Is this answer useful? Yes | No
July 17, 2005 09:55:26   #3  
PRATAP_k        

RE: What is the difference between ActionForm and DynaActionForm
if the formbean is a subclass of ActionForm, we can provide reset(),validate(),setters(to hold the values),gettters whereas if the formbean is a subclass to DynaActionForm we need not provide setters,getters but in struts-config.xml we have to configure the properties in using .basically this simplifies coding
 
Is this answer useful? Yes | No
August 23, 2005 05:52:27   #4  
Anindit Sinha        

RE: What is the difference between ActionForm and DynaActionForm
An ActionForm represents an HTML form that the user interacts with over one or more pages. You will provide properties to hold the state of the form with getters and setters to access them.  
Maintaining a separate concrete ActionForm class for each form in your Struts application is time-consuming. It is particularly frustrating when all the ActionForm does is gather and validate simple properties that are passed along to a business JavaBean.  
 
This bottleneck can be alleviated through the use of DynaActionForm classes. Instead of creating a new ActionForm subclass and new get/set methods for each of your bean's properties, you can list its properties, type, and defaults in the Struts configuration file.  

 
Is this answer useful? Yes | No
August 24, 2005 06:45:03   #5  
Gandhiraj from Ewaksoft        

RE: What is the difference between ActionForm and DynaActionForm
If you are using actionform then you should specify the getter and setter for each components of presentation (jsp ) in to FormBean file.So it is some what complecated one to specify each component for setter and header. To avaid this method we are having DynoActionForm.In struts-config.xml file we can specify the properties.  
 

 
Is this answer useful? Yes | No
September 03, 2005 07:28:26   #6  
SNMP        

RE: What is the difference between ActionForm and DynaActionForm
Action form pls refer SNMP7.3 
DynaAction form pls refer SNMP7.3 

 
Is this answer useful? Yes | No
September 21, 2005 03:22:34   #7  
Amit Mudgal        

RE: What is the difference between ActionForm and Dyna...

In case of the ActionForm user himself has to write the setters and getters when ever he adds a control. The same process is repeated again and again when user creates a view. 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 useful? Yes | No
October 31, 2005 12:10:27   #8  
prabhaker        

RE: What is the difference between ActionForm and Dyna...

Dyna Action form is a Generic Action form which can be represent a form.The properties of the form bean can be represent at the time of Deploying the application.

Where as in the Action form the propeties are mentioned or tightly coupled to the form.

In Dyna action form of struts-config .xml file


 
Is this answer useful? Yes | No
October 31, 2005 12:16:08   #9  
prabhaker Member Since: October 2005   Contribution: 5    

RE: What is the difference between ActionForm and Dyna...

Dyna Action is a Generic action form which represents a form.

properties of the form are decided at the timeof deplying the application.

Where as in Action form form field propertie are decided when we develop the application ,there is no chance if in future we want to change any modyfication without changing the entire application.


 
Is this answer useful? Yes | No
May 24, 2007 06:35:53   #10  
Sunil Thomas        

Difference between ActionForm and DynaActionForm

You can get the correct picture about DynaAction Form here
http://struts.apache.org/1.3.8/userGuide/building_controller.html#dyna_action_form_classes


And in the action class, we retrieve a particular property of the DynaActionForm as follows

        DynaActionForm userForm= (DynaActionForm)form;
   
        int userId= ((Integer)userForm.get("userId")).intValue();

 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape