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 Spring and the fly likes Command Object in MultiActionController 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 » Spring
Bookmark "Command Object in MultiActionController" Watch "Command Object in MultiActionController" New topic

Command Object in MultiActionController

Frank Truong
Ranch Hand

Joined: Nov 19, 2002
Posts: 39

I am still using Spring2x. How do I bind a command object into MultiActionController?
It seems to work fine if I pass a anonymous object into the handler methods. For instance,

But my .jsp file contains other input parameters that I want to bind. Customer class happens to be an entity bean that maps to Customer table in db. I cannot figure out how to map other input parameters(checkboxes, dropdown list, etc) to my MultiActionController. I cannot define these properties in my entity bean. I had monkeyed a lots with ServletRequesDataBinder object. But I still haven't been able to find the solution for this.

Please give me some hints!

Frank Truong
Ranch Hand

Joined: Nov 19, 2002
Posts: 39
I decide to 'memorize' these input parameters in the session. So, my controller and .jsp files can refer to them. I don't know whether this is the way I should do. But this 'binding' seems to be workable for me.

Please advise!

Michael Houlo
Ranch Hand

Joined: Jun 07, 2010
Posts: 58
I don't really get it .. What do you mean ?
You just want to populate a dropdown list with another table as input data ? somethings like this ?
If so, just use your referenceData method.
I agree. Here's the link:
subject: Command Object in MultiActionController
jQuery in Action, 3rd edition