• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Handling multiple forms with spring 3 MVC

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI , I am implementing user registration for a website where the registration process is a 5 step process each I need to get a form from client.
For ex. in 1st stage only username and password , in 2nd stage age and country , in 3rd stage email id , licence agreement ... etc.

I am able to handle each stage by using some model attribute and its validation, but I am not sure , in the 2nd stage , how to access form data got in 1st stage ?

My problem is after 5 stages are over i need to store all the data that I got in 5 stages in a single row in DB.

The problem I am able to handle each stage individually , but not sure how can I get data that i have read already in earlier stages ?

1) Is there any way that I can put data read in a session and access it after 5 stages are over ?

2) is there a way to use same bean for all stages ? the problem is i need to do validation on the data received from the bean . Right now I am handling a separate bean for every stage but it is not an efficient way ..

I want to use a common model bean for storing the data in all five stages but do only relevant validation on the data i got in each step ?

Can anybody clarify ?

thanks
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Earlier in Spring, we had a AbstractWizardFormController, which was best suited for this type of requirement. Its deprecated from Spring 3.x onwards. Take a look at Spring Web Flow.
 
reply
    Bookmark Topic Watch Topic
  • New Topic