• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic