• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CheckBox validation

 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi every body I am facing one peculiar problem , I am using <h:selectBooleanCheckbox> in my app.I want to validate it , for that reason I am using required="true" , but it is not validating or showing any message . What is the reason ?


Here is my JSF code :



With out clicking this check box , if click the submit button it is not validating or showing any meassage.


Thanks ,
S
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Somebody asked the exact same question about 2-3 months ago. Try using the forum search. As I recall, the short answer is that "required="true"" doesn't work that way. In part because what good would a checkbox be if it was always required to be checked? But the real reason was that "required' doesn't mean white what you think.

Actually, I do have an app where it's mandatory for the user to check a checkbox as a legal acknowledgement. For that I wrote a custom validator.
 
reply
    Bookmark Topic Watch Topic
  • New Topic