• 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

Get the count of selectted checkbox

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Help me solve the below problem.

I am using a datatable. Inside that table I am using a "selectBooleanCheckbox". Can any one to help me to get the count of the selected checkbox inside the tables when trigger an action. Please find my JSF code for datatable.

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

one way would be using value change listener in the checkbox

when one clicks the check box if the value is checked that is true add it in array or list

finally when you click on button that carries out some action you can get the size of the array or the list and find out the no. of check boxex checked.

thankyou

brajen
 
Bibin Zacharias
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi brajen,

Thanks for your reply. Some how I managed it using javascript.

Find the code here

 
reply
    Bookmark Topic Watch Topic
  • New Topic