I have datatable with checkboxes on each row and a single checkbox on table column to check/uncheck all.
<h:dataTable id="datatable1">
<h:column headerClass="center-checkbox">
<f:facet name="header">
<h:selectBooleanCheckbox value="#{bean.tbl.checkAll}" id="checkAllSelector">
<f:ajax render="datatable1 "/>
</h:selectBooleanCheckbox>
</f:facet>
<h:selectBooleanCheckbox value="#{bean.tbl.checked[r]}">
<f:ajax render="checkAllSelector"/>
</h:selectBooleanCheckbox>
</h:column>
</h:dataTable>
I want to re-render checkAllSelector on every checkbox click in table row but
<f:ajax render="checkAllSelector"/>
is transalated to this (for each row)
onclick="mojarra.ab(this,event,'valueChange',0,'datatable1-1-checkAllSelector')"
onclick="mojarra.ab(this,event,'valueChange',0,'datatable1-2-checkAllSelector')"
onclick="mojarra.ab(this,event,'valueChange',0,'datatable1-3-checkAllSelector')"
and it should be
onclick="mojarra.ab(this,event,'valueChange',0,'datatable1-checkAllSelector')"
onclick="mojarra.ab(this,event,'valueChange',0,'datatable1-checkAllSelector')"
onclick="mojarra.ab(this,event,'valueChange',0,'datatable1-checkAllSelector')
How to avoid preapending this id of each checkbox The form tag has prependId="false"