This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Regarding Struts FormBean mappings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding Struts FormBean mappings" Watch "Regarding Struts FormBean mappings" New topic
Author

Regarding Struts FormBean mappings

Kuyni Kumar
Greenhorn

Joined: Jan 18, 2011
Posts: 14
Hi Team
In struts 1.3.x
We have to maintain the mapping between html form input controls and FormBean set/get methods
Now I am in a situation, where I do not want mapping for some of the controls in html with Formbean. Some one please suggest me.
Note: I have to use to struts as I am using tilesframe work.

Thanks in advance
Pyla Rao
Ranch Hand

Joined: Jul 10, 2012
Posts: 50
If dont want use form bean for mapping html elements , you can use dyna action form.then no need of setter and getter methods.
Sandip Ram
Greenhorn

Joined: Jun 13, 2012
Posts: 4
Hi
I Have a small doubt here.
Whether you want to remove your ActionForm completely or just want to remove get/set methods from form bean class.
Pyla Rao
Ranch Hand

Joined: Jul 10, 2012
Posts: 50
If you want use DynaActionForm instead of ActionForm, there no need setter and getter methods, DynaActionForm take care about those.

but you need to mention in struts-config file as following/
Struts-config.xml


But in Action class



There is no need of create actionform,struts is doing it for us..


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Regarding Struts FormBean mappings
 
Similar Threads
Difference between DTO,FormBean & ActionForm
dynamic indexed properties
Struts Error Help Needed
MappingDispatchAction's JSP CODE
Shine J2EE Framework 1.2