permaculture playing cards*
The moose likes JSF and the fly likes Get the count of selectted checkbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Get the count of selectted checkbox" Watch "Get the count of selectted checkbox" New topic
Author

Get the count of selectted checkbox

Bibin Zacharias
Greenhorn

Joined: Mar 31, 2009
Posts: 13
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.



Thanks
Bibin
bibinz@gmail.com
Brajendra Mathema
Ranch Hand

Joined: Jun 02, 2009
Posts: 39
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

Joined: Mar 31, 2009
Posts: 13
Hi brajen,

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

Find the code here

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Get the count of selectted checkbox
 
Similar Threads
How to get multiple h:selectOneMenu values inside h:dataTable on form submit
Datatable column header issue
Issue with passing expression to a hashmap key in a dataTable column
SelectAll checkbox in header column
setting up hashmap key in t:SelectBooleanCheckbox in a dataTable