aspose file tools*
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
Author

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

Hi,
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 ..

Regards,
Alim


Regards,
Alim

SCEA/OCMJEA Part1,SCBCD1.5,SCWCD1.4,SCJP1.4,SQL(Z007)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Selecting all JSF checkboxes