-
New Feature
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
https://sourceforge.net/tracker/?func=detail&aid=3315234&group_id=152762&atid=785194
Add a setConverter() method to the Binder class. Then in the "onBindingValidate(BindingValidateEvent event)" event listener on my composer I can apply a custom converter to all components of a certain type.
I'm using Hibernate Validator annotations on my entity beans that are bound to zk ui components. If you put @Size(min=10, max=10) on a String field then Hibernate evaluates it when a non-null value is set on the field but does not evaluate it when a null value is set. The problem is that the <textbox> component sets an empty string on the field when the user removes the value in the textbox. I can create a custom converter to convert empty strings to nulls and apply it to the textbox using the "@
" syntax but when the form has lots of textbox components it gets a bit tedious.