[jboss-user] [JBoss Seam] - Re: Validation annotations on private fields

rhasselbaum do-not-reply at jboss.com
Mon Jan 14 11:13:35 EST 2008

Well, if I annotate a private field with, say, @Length(max=50) and validate a form, invalid data doesn't get flagged. But when I move the same annotation to the corresponding property getter, validation works perfectly.

Hmm... I wonder if it has anything to do with my naming convention for private fields. I use an "m_" prefix. Maybe this prevents Seam from determining the property name. Is there a Seam equivalent to Hibernate's NamingStrategy interface, so I could tell it how to translate field names to property names? 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119704#4119704

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119704

More information about the jboss-user mailing list