aspose file tools*
The moose likes Spring and the fly likes How to skip formBackingObject method execution in spring when validation fails. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to skip formBackingObject method execution in spring when validation fails." Watch "How to skip formBackingObject method execution in spring when validation fails." New topic
Author

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

Dinesh Pise
Greenhorn

Joined: Jul 18, 2012
Posts: 27
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
 
Don't get me started about those stupid light bulbs.
 
subject: How to skip formBackingObject method execution in spring when validation fails.