Get your CodeRanch badge!*
The moose likes Other Application Frameworks and the fly likes spring : bind path= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "spring : bind path=" "" Watch "spring : bind path=" "" New topic
Author

spring : bind path=" "

ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 120
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 120
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

Joined: May 01, 2008
Posts: 120
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: spring : bind path=" "
 
Similar Threads
Spring form binding error
Spring Hibernate Transaction 2
regarding adding form data to 2 tables on single click without Hibernate.
struts vs spring framework
Mapping two Hibernate Object based on their foriegn keys