• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to highlight multiple fields with a single error message?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

This is regarding Spring 2.5-validation. The idea is to display a single error message and highlighting (rejecting) all the fields in the form at the same time.
I'll explain this in detail,

i have a jsp page, a controller and a validator. After the basic form validation-that is handled by the validator- the controller does the business validation. Now, if the business validation fails, the requirement is to highlight all the fields in the form by displaying a single error message on top.

when i googled it, i figured out that one can reject an entire form using -
<form:errors>

in addition to it, one can limit the form:errors tag by enclosing it in <spring:bind path="field name">

with this solution, i'm not able to highlight all the fields. i tried using the cssClass attribute for the form:errors as well.

Thank you in advance..
 
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic