Nesting Seam Validation Tags
Here’s an interesting one that caused me to stumble for a while… If you are leveraging Seam’s field-level validation and are mixing it with Rich Faces components, you have to be conscious of how you nest your tags.
For example, this caused validation to be skipped:
When clicking on the save button, you will bypass validation and go directly to the save() method on the named component myService.
To fix this, you need to nest the
Viola, now your required tags are properly enforced, as well as any Hibernate annotation validation that exists.
About this entry
You’re currently reading “Nesting Seam Validation Tags,” an entry on Elegando
- Published:
- 08.28.07 / 10am
- Category:
- JBoss Seam, JSF
2 Comments
Jump to comment form | comments rss [?] | trackback uri [?]