I am using validator framework and it is working fine. But is there any way to focus the cursor on the error field in struts. And how can we display only one error at a time. Please help me!
posted 8 years ago
Originally posted by Vipin Sahu: is there any way to focus the cursor on the error field in struts.
If fields A, B, and C all have errors, focus will be on FieldC since it's the last in the list. You therefore might want to put the conditions in the reverse order of how they appear on the screen. That way the top field on the screen that has an error will get the focus.
Originally posted by Vipin Sahu: how can we display only one error at a time.
You do this using the property attribute. If you want a separate field that only shows errors for fieldA, specify the following: