jQuery in Action, 3rd edition
The moose likes JSF and the fly likes Selecting all JSF checkboxes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Selecting all JSF checkboxes" Watch "Selecting all JSF checkboxes" New topic

Selecting all JSF checkboxes

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I have a created a Datatable , it contains a checkbox and like the normal Email web pages like Yahoo Mail, I want that when a user selects one checkbox all other checkboxes are checked.This is
a classic Javascript problem , but when i checked the HTML generated from the JSF application. i saw

<input type="checkbox" name="_idJsp15:data1:0:hsbcb340" id="_idJsp15:data1:0:hsbcb340" value="true" />
<input type="checkbox" name="_idJsp15:data1:1:hsbcb340" id="_idJsp15:data1:1:hsbcb340" value="true" />
<input type="checkbox" name="_idJsp15:data1:2:hsbcb340" id="_idJsp15:data1:2:hsbcb340" value="true" />

Please how do i select all the checkboxes
Alim Atar
Ranch Hand

Joined: Oct 06, 2006
Posts: 102

This can be solved by using ajax a4j:support and a4j:region.
If you changing the one check box then call reRender of <a4j:support...> and rerender the all check box and from end you can set values for that check boxes ..



I agree. Here's the link: http://aspose.com/file-tools
subject: Selecting all JSF checkboxes
It's not a secret anymore!