Im trying to create a select all button or check box that when clicked all the selectbooleanCheck boxes will be checked. is there no straight forward easy way.ive started creating the selectcheckbox that will when changed selectAll. thanks
<p:dataTable value="#{illRequestModel.list}"
var="illRequestRecord" width="100%" styleClass="request-table"
rows="10" paginator="true" id="requestGrid"
currentPageReportTemplate="Viewing Page {currentPage}"
paginatorTemplate="{CurrentPageReport} {PageLinks} "
paginatorPosition="bottom">
<p:column >
<f:facet name="header">
<h:selectBooleanCheckbox id="checkbox2" title="emailUpdates2" onchange="CheckAll()" >
</h:selectBooleanCheckbox>
</f:facet>
<h:selectBooleanCheckbox id="checkbox" title="emailUpdates"
value="#{illRequestRecord.selected}"
onchange="addNumber(#{illRequestRecord.localRequestId})">
<f:ajax listener="#{illRequestRecord.selectmethod}" />
</h:selectBooleanCheckbox>
</p:column>
<p:column id="localRequestIdCol"
sortBy="#{illRequestRecord.localRequestId}">
<f:facet name="header">
<h:outputText value="ID" />
</f:facet>
<h:commandLink value="#{illRequestRecord.localRequestId}"
action="#{requestListController.displaySingleRecord}">
<f:param name="selectedItemId"
value="#{illRequestRecord.localRequestId}"></f:param>
</h:commandLink>
</p:column>