File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Command object is not setting up properly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Command object is not setting up properly" Watch "Command object is not setting up properly" New topic
Author

Command object is not setting up properly

SaurabhS kumar
Greenhorn

Joined: Apr 30, 2009
Posts: 2
Hi Everyone,
I am new to Spring framework and getting some problem in saving a simple form.

I have a jsp page with form having following six fields and corresponding columns in a table -

title
firstname
lastname

address
email
phone

It represents a Customer object which has a PersonInitial object -



How can I set Customer object with PersonInitial object when submit the form. With following controller implementation I am getting null values in title, firstname and lastname -



Thanks for any help.
SaurabhS kumar
Greenhorn

Joined: Apr 30, 2009
Posts: 2
Hi Experts,

Can I have a solution please?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Are there getters and setters for title, firstName, and lastName on Customer, or only on PersonInitial - ie would you call it like -



or



And how are your form names mapped to your command object?

-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Command object is not setting up properly