• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Struts2] losing display only(prepopulated) values of the form if the validaiton fails

 
sv kvr
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a jsp which displays some read only information and few fields for input which are all part of the same bean/form.
When the form is submitted and the validation fails, the display only information is lost from the form. below is my code. how do i retain my form values and still display the validation errors?



 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Post your authorizedUser.jsp code completely.

2) Suggestion here you are using chain result type which is not required(if possible avoid using chain). Instead you can prepare interceptor for populating data.
 
sri kota
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I use prepareinterceptor, would it be called automatically, everytime, my submit is called? along with validation xml? Can you help me with an example to implement prepare in this scenario. Below is the jsp.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic