File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 : Validation problem with dropdown box.

 
Praveen Kumar Singh
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a jsp page in which i have 2 text box with one drop down box. page is generated by a action class, which populate the data in drop down box. when i press submit, data of text field validated as per validation.xml file, in case of success go to another action class and on failure display error message on jsp page.

Now problem is when validation fails, i get the error message, but do not get back the data of drop down box.

Do we have some kind of solution by struts2 for this problem(the code is for production, hence i can't use scriplets, or some wired logic )
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a pretty noticeable bug to make it into production.

http://struts.apache.org/2.x/docs/how-do-we-repopulate-controls-when-validation-fails.html
 
Praveen Kumar Singh
Ranch Hand
Posts: 43
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David

Thanks for the answer, it helped me a lot.

It is nice to see that online docs has this solution, it is so badly written i almost stop following it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic