Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

spring : bind path=" "

 
ramesh kancherla
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This is Ramesh. I am implementing spring and hibernate in my application.
I have to get values from single form like registration form and store these values into two tables like user table and person table.

using hibernate these two tables need two bean classes, I have implemented these beans with names login.java and person.java.

for getting form details we have to register command class in form controller, I know for single table.

can any one please give me suggestion how do i get form details with spring bind for storing form values into multiple tables.

Thanks & Regards
Ramesh K
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I recommend using Spring MVC, create an @Controller class with two methods one to setup the form and one to handle the submit, for the setup method annotate it with @RequestMapping(HttpRequest.GET) for the submit annotate it with @RequestMapping(HttpRequest.POST) (something like that, you will need to consult the documentation for the correct class and Constant). You will also need the documentation for loading up the ApplicationContext into the web environment and also deploying the DispatcherServlet, but that is all in the docs.

Good Luck

Mark
 
ramesh kancherla
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have to bind values in spring.like as

Employee.empId
Employee.Adress.city

I have implemented two beans like Employee and Adress and Address bean is part of emplolyee bean.
how do i fill take values from jsp using spring.

can any one please give me suggestion.

Thanks Regards
Ramesh
[ September 24, 2008: Message edited by: ramesh kancherla ]
 
ramesh kancherla
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ,
when I am accessing city from employee to addresss to city I am getting null value.

Employee--> Address-->city

how can I get this city value from spring : bind tag

can any one please tell me

Thanks & Regards
Ramesh K
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic