File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Command object is not setting up properly

 
SaurabhS kumar
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Experts,

Can I have a solution please?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic