Get your CodeRanch badge!*
The moose likes Struts and the fly likes lost form data after validation errors return from actionform Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "lost form data after validation errors return from actionform" Watch "lost form data after validation errors return from actionform" New topic
Author

lost form data after validation errors return from actionform

giridhar jaligama
Greenhorn

Joined: Sep 21, 2008
Posts: 3
Hi All,

I implemented a Struts form. It contains dyanmic form elements as explain in one of this forum [url=http://'http://www.coderanch.com/t/54199/Struts/dynamic-form-elements-struts']'http://www.coderanch.com/t/54199/Struts/dynamic-form-elements-struts'[/url]

I used innerHTML to add rows, everything is working fine. I am able to extract dyanmic form elements in my action class. but the problem is when there is a validation error occurs in the ActionForm and returns errors, then my form lost the fields I created previously, also the data entered in the filed.

do know why this happing.. do you faced any such issues. How to over come this problem..

Thanks in advance.
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
It might help to see your form, jsp, and the html generated when you add a row.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: lost form data after validation errors return from actionform
 
Similar Threads
Validation for Indexed types
server side validation errors
Two forms in a page problem
using a pojo model in a struts app
Multiple forms in JSP