• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

How to skip formBackingObject method execution in spring when validation fails.

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,

I am working on a spring 2.5 xml based development and my task is to display some values on form:input tag before the jsp page is called. So I used formBackingObject method to display some values which is fetched from database. It is a edit form basically so I need to display the old value.

My query is when user edit old values and update the new one and click on submit button after which the flow goes to validate(Object target, Errors errors) method if validation fails it will go back to jsp page but before hitting jsp it will call the formBackingObject method and will again fetch the data from database and again the old value will be displayed on jsp.

I want instead of old value the value updated by the user should be display:
for eg : the old value of experience is 5 years and new value updated by user is 6years then if validation fails new value should be displayed and not the old one since the old value is fetched from database when formBackingObject is called and the same is displayed on jsp.

Please help me.

Thanks
Dinesh Pise
 
reply
    Bookmark Topic Watch Topic
  • New Topic