[英]Primefaces datatable row selection event
I'm trying to use Primefaces datatable with radiobutton-selection but the rowSelect event is not fired.我正在尝试使用带有单选按钮选择的 Primefaces 数据表,但没有触发 rowSelect 事件。
If I set selectionMode="single"
in the datatable the event is fired, but the whole row is clickable.如果我在数据表中设置
selectionMode="single"
事件被触发,但整行都是可点击的。
<p:dataTable value="#{bean.items}" editable="true" var="item" selection="#{bean.selectedItem}" rowKey="#{item.id}">
<p:ajax event="rowSelect" listener="#{bean.doSomething}" update=":form:msgs" />
<p:column selectionMode="single" />
....
Is it possible to trigger the rowSelect-event when using radiobutton-selection?使用单选按钮选择时是否可以触发 rowSelect 事件?
Use the rowSelectRadio
event使用
rowSelectRadio
事件
<p:ajax event="rowSelectRadio" listener="#{bean.doSomething}" update=":form:msgs" />
Check the PrimeFaces user guide.查看 PrimeFaces 用户指南。 It lists all the ajax behaviour events for each component.
它列出了每个组件的所有 ajax 行为事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.