-
1. Re: Red boundary around invalid field
ilya_shaikovsky Mar 2, 2010 4:55 AM (in response to duke_rich_420)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.
-
2. Re: Red boundary around invalid field
duke_rich_420 Mar 2, 2010 5:37 AM (in response to ilya_shaikovsky)Hi Ilya
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
thanks
-
3. Re: Red boundary around invalid field
ilya_shaikovsky Mar 2, 2010 6:56 AM (in response to duke_rich_420)bind your class according to some condition bound to iteration variable. -
4. Re: Red boundary around invalid field
duke_rich_420 Mar 2, 2010 7:34 AM (in response to ilya_shaikovsky)i could not got your point ....
it will be hardcoded lots of change
thanks
-
5. Re: Red boundary around invalid field
vishal3007 Mar 12, 2010 11:54 AM (in response to duke_rich_420)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.
http://docs.jboss.org/seam/2.0.0.GA/reference/en/html/controls.html
PS: This will work only if your project support Seam.