Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

checkall boxes from managebean jsf  RSS feed

 
Steinboch roicho
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I want to make a method that checks all the checkboxes from a page(like a select all button), is this possible?
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that is possible using Javascript. I do not know if JSF has something like that.
 
Tim Holloway
Bartender
Posts: 18709
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep. Just set all the backing bean properties that correspond to the checkboxes to "true". The next time the page is rendered, the checkboxes will be checked.

However, if you want immediate response to a master checkbox, the master checkbox would have to force a submit in an onclick method, since checkboxes aren't normally "submit" controls.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!