[英]Select row checkbox on each item select in Primefaces datatable cellEditor
When I select an item in datatable
with editMode="cell"
(eg inputText , selectOneMenu) only that specific component is selected which is normal, but I want to select to whole row when I click on it, not just the component. 当我在选择项目datatable
与editMode="cell"
(如inputText的,selectOneMenu用于)只有特定的组件选择这是正常的,但我想选择整行,当我点击它,不只是组件。
my problem is kind of UI related, there are specific areas on the row when you click on, the whole row gets selected, but when you click on the component in the row, only that component gets selected not the row and if you're collecting the object in backing bean, you don't have that row object. 我的问题是某种程度上与UI相关,单击时该行上有特定区域,整个行都被选中,但是当您单击该行中的组件时,只有该组件被选中而不是行,如果您单击将对象收集到支持bean中,就没有该行对象。
You can use the clientId from AjaxBehaviorEvent to get the index of the data. 您可以使用AjaxBehaviorEvent中的clientId来获取数据的索引。 ClientId is look like this ClientId看起来像这样
form:feeTbl:0:j_idt49
0 is the index. 0是索引。 To get the index, you need to split it. 要获取索引,您需要对其进行拆分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.