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 77 of 102    Print  
Should every html form property have a corresponding formbean get/set and variable.?
Can form property be omitted in a form bean?

  
Total Answers and Comments: 4 Last Update: September 05, 2008     Asked by: shobana24 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Jayakanthan
 
Yes every html field property have a corresponding formbean get/set methods. Otherwise you will get this (No getter Method) error.

Above answer was rated as good by the following members:
pradeep_rmk
October 24, 2006 16:59:18   #1  
sharadmrg@GeekInterview.com Member Since: February 2006   Contribution: 6    

RE: Should every html form property have a correspondi...

Yes every html form property have a corresponding formbean get/set methods. Otherwise you'll get error.

  Abhishek(Sharad)


 
Is this answer useful? Yes | No
October 26, 2006 04:57:53   #2  
Jayakanthan        

RE: Should every html form property have a correspondi...
Yes every html field property have a corresponding formbean get/set methods. Otherwise you will get this (No getter Method) error.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
November 14, 2006 06:43:23   #3  
chevuru Member Since: May 2006   Contribution: 2    

RE: Should every html form property have a correspondi...

Get & Set are not compalsary for each form. when you specify type as DyanActionForm in the form bean in struts-config.xml as below, with each field  declared as form-property

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


 
Is this answer useful? Yes | No
September 05, 2008 08:38:36   #4  
vinaymudgil007 Member Since: May 2008   Contribution: 39    

RE: Should every html form property have a corresponding formbean get/set and variable.?Can form property be omitted in a form bean?
well i think using DynaActionForm this can be avoided.

Regards,
Vinay

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
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