Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Using html:messages or logic tags, is it possible to output a header for each property which has errors attached to it, without explicitly coding a html:messages block for each property?

0
Posted

Using html:messages or logic tags, is it possible to output a header for each property which has errors attached to it, without explicitly coding a html:messages block for each property?

0

I have a form which has several fields, which are validated in the Action class. These errors are added to the ActionErrors collection with the field’s property name, for example, errors.add(“myFirstField”, new Action Error(…); Now, in the jsp, it is possible to produce an output such as Errors for My First Field Errors for My Third Field I would like to do this without repeating a block for each property in the form as (a) this would be error prone, programmers may miss to put this block for all the properties in the form and (b) if this can be done without reference to specific form’s properties, then this generic code can be pulled into each page via some kind of include or template mechanism. Thanks in advance for any hints.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123