【发布时间】:2012-03-01 17:10:00
【问题描述】:
我正在使用 PF 3.1.1、JSF 2.0。
我有一个带有 selectBooleanCheckBox 列的数据表。当用户选择我希望复选框被选中的行时,当用户选中复选框时,应该选中该行。
我正在对 selectBooleanCheckBox 进行 ajax 调用,它更新了支持 bean 中的 selectionArray,但结果未显示在屏幕上。
这里是代码-
<p:dataTable id="mylist" value="#{myController.selectedLists}"
selection="#{myController.myArray}"
selectionMode="multiple"
var="item"
rows="5"
rowKey="#{item.id}"
sortBy="#{item.name}"
sortOrder="ascending"
>
<p:ajax event="rowSelect"
listener="#{myController.onSelectList}"
update="mylist"/>
<p:column style="width: 20px;" id="gs">
<h:selectBooleanCheckbox id="booId"
value="#{item.booVal}">
<f:ajax execute="@this"
listener="#{myController.booValListener}"
render="mylist"/>
<f:attribute name="item" value="#{item}" />
</h:selectBooleanCheckbox>
</p:column> </p:datatable>
非常感谢任何帮助。
【问题讨论】:
标签: primefaces