Daggeto
Daggeto

Reputation: 993

On jsf submit, selectOneMenu validator runs only when required="true" is setted. Why?

I discovered that jsf validator binded to selectOneMenu, on submit is called only when selectOneMenu have required="true". How can i resolve this to call validator without that attribute?

Upvotes: 0

Views: 603

Answers (1)

BalusC
BalusC

Reputation: 1109665

I discovered that jsf validator binded to selectOneMenu, on submit is called only when selectOneMenu have required="true".

That's indeed by specification. This applies to all other input elements as well, by the way.


How can i resolve this to call validator without that attribute?

You cannot. Just specify the required="true" attribute if you require the enduser to select an item. It's by default optional because there may be circumstances where you don't require the enduser to select an item.

Upvotes: 1

Related Questions