| Author |
h:selectBooleanCheckbox required validation
|
ya ji
Ranch Hand
Joined: Jul 14, 2008
Posts: 40
|
|
How to validate required for h:selectBooleanCheckbox? Code: <h:selectBooleanCheckbox label="User Group" required="true" id="selusergroups" value="#{UserBean.ugSelection[usergroup]}" /> it's now working.
|
 |
Bhaskar GR
Greenhorn
Joined: Jun 13, 2008
Posts: 28
|
|
|
You have to generate validation in backing bean
|
 |
ya ji
Ranch Hand
Joined: Jul 14, 2008
Posts: 40
|
|
Hi Bhaskar, Could you give me some idea about that or provide some sample code? thanks,I'm a freshman of JSF
|
 |
Venkat Sadasivam
Ranch Hand
Joined: May 10, 2008
Posts: 139
|
|
What is the kind of validation are you expecting in boolean check box? As I understand it has only two condition either checked or unchecked. I feel there is no validation is required for boolean check box.
|
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
|
 |
ya ji
Ranch Hand
Joined: Jul 14, 2008
Posts: 40
|
|
|
A checkbox group, validate at least one checkbox checked.
|
 |
Venkat Sadasivam
Ranch Hand
Joined: May 10, 2008
Posts: 139
|
|
|
In that case you have to use <h:selectManyCheckbox />
|
 |
 |
|
|
subject: h:selectBooleanCheckbox required validation
|
|
|