The situation is the following:
- I have a JSP page with a form.
- This form contains various
<select>
tags with options loaded from DB. - I want to use validation with an XML file.
The problem is the following: if I use an XML file and there are some errors in the form fields, the struts framework doesn't pass through the class method I laid out, but it will directly return the input
result. So what's the point? That in this way I can't load the options for the various <select>
tags I mentioned above.
So I thought to do something like this:
<result name="input" type="chain">
<param name="actionName">Class_method</param>
</result>
but with this trick I lose all the error messages, i.e. hasFieldErrors()
returns always false.
How can I solve that?