This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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 Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Domain Object as Strtus Action form. " Watch "Domain Object as Strtus Action form. " New topic
Author

Domain Object as Strtus Action form.

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 760
Hi,

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..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Domain Object as Strtus Action form.