FacesContext.getClientIdsWithMessages() - using the method you could check the components with validation failed.
Then you could find the components in view and add some styling.
i have tried the same but the problem is that i am using <a4j:support onblur event to validate fields and on the listener side i got all the fields that are marked for validation
what i got from this is that it is validationg all fields but by using ajax its showing validation error against one field
is there any way to got only that field which is validated during onblur event not all the fields on the form
bind your class according to some condition bound to iteration variable.
i could not got your point ....
it will be hardcoded lots of change
Put your component in s:decorate tag.
Mark the component as invalid(component.setValid(false)) in your Validator and set the styleClass attribute of your component as
styleClass = "invalid?'errorStyle': 'normalStyle'"
search invalid in the following link.
PS: This will work only if your project support Seam.