File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
It's not a secret anymore!