This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes DataTable and Select All Checkboxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "DataTable and Select All Checkboxes" Watch "DataTable and Select All Checkboxes" New topic

DataTable and Select All Checkboxes

Ayan Afridi

Joined: Jan 18, 2005
Posts: 24

I have a h:datatable that has a checkbox in each row.
In the footer of the datatable, there is a button that "approves" all the selected rows (ie, it calls an action in the managed bean). If I select rows manually by checking off each checkbox, and then click "approve" - the action is fired everything is good.

Then I put in a "select all" checkbox, that selected all the showing checkboxes on the page. What the problem is, is that when I click approve now, no action is fired.

Any idea what is going on? I know this is a JSF forum - but here is the JS code:

I agree. Here's the link:
subject: DataTable and Select All Checkboxes
Similar Threads
How to find Checkboxes?
Check All button for all spring check boxes array
Which Package to Import to Use FacesContext's getRequestMap()?
Problem with selecting checkboxes in subTable
Checkbox validation - at least one selected