Ajax-从单元格内部更新h:列标题中的组件

时间:2015-11-30 13:52:37

标签: jsf columnheader ajax-update

我在每行上都有带有复选框的数据表,在表格列上有一个复选框来检查/取消选中所有行。

<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>

我想在表格行中的每个复选框点击重新呈现checkAllSelector,但

<f:ajax render="checkAllSelector"/>

被转换为此(每行)

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')"

它应该是

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')

如何避免在每个复选框的前缀中添加此ID 表单标记有prependId =“false”

0 个答案:

没有答案