I have a problem with validation in my JSF application: I have a <h:selectManyListbox>
which is backed by a Set
in the bean. The Set is annotated with @NotNull
and @Size(min=5, max=9999)
.
My Problem now is: The set will not be validated until the user not select at least one entry in the listbox. If he select one, two or three entries its not possible to save: validation error. But if he never select an entry in the list he can save with empty set.
Any ideas how I can fix that?
#{addCardBean.card.categories.isEmpty()}` both show true ... – chris Jan 24 '13 at 18:25