Two Laptop Bag
The moose likes Struts and the fly likes Domain Object as Strtus Action form. 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 "Domain Object as Strtus Action form. " Watch "Domain Object as Strtus Action form. " New topic

Domain Object as Strtus Action form.

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 761

Can we create Struts action form without extending ActionForm class ?

I want to use Domain Object as an action form of struts.

Jigar Naik

Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

No, we can't. A simple example or way to look into it - while you submit your request, struts does the all required processing to set the request content in the corresponding form (your) which extends the ActionForm. In the action classes what you get(known by the method signature) is main/parent type(generic form, the ActionForm) and not the our actual domain form. And to me this is one of the reason or drawback why 1.x is let down

Have Fun with Java
little,little.. little by little makes a lot..
subject: Domain Object as Strtus Action form.
It's not a secret anymore!