1

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"

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Igor Vuković
  • 742
  • 12
  • 25
  • If i put a div arount h:dataTable and point ajax to this div everything works fine . Ajax action is translated to onclick="mojarra.ab(this,event,'valueChange',0,'tblContainer')" – Igor Vuković Nov 30 '15 at 14:06

0 Answers0