This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding Struts FormBean mappings" Watch "Regarding Struts FormBean mappings" New topic

Regarding Struts FormBean mappings

Kuyni Kumar

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

Joined: Jun 13, 2012
Posts: 4
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/

But in Action class

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

Consider Paul's rocket mass heater.
subject: Regarding Struts FormBean mappings
jQuery in Action, 3rd edition