• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Path Value in input type in jsp page using Spring MVC

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody!

This is my jsp page:



This is my Order(bean) class:




This is my Item (bean) class:





This is my Spring controller:







Can someone please tell me what should be the path value of the following code which i have mentioned in the jsp page:



Please help me!

Thanks
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like your page is for entering details for an item...

So the command object should be an Item, not an Order - fill out the Item, and add it to the Order on submit. You'd need some way to get the current order to add it to - so you'd probably save the current Order in the session.
 
Manoj Paul
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
Thanks for the reply.

But I need the Order as command because in my jsp page there are some Order properties too which I didn't mentioned in the jsp page that I post in this forum.

This is my Order class:




Order is my parent entity and ItemSet(Set) is a collection of a group of Item Objects that will be submitted when a customer will save his order. Its one-many relationship.

Please advice.
Thanks again for the reply.
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code is too long. You don't need to post unnecessary code.
 
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic