Primefaces datatable roweditor: only permit one row editing

前端 未结 2 633
轮回少年
轮回少年 2020-12-25 14:21

I\'m working with JSF 2.1.6 and Primefaces 3.4.1 and I have a question.

I have an editable datatable with row editor. You can click the pencil button of each row, an

2条回答
  •  执笔经年
    2020-12-25 14:30

    You need to iterate through the elements, and cancel any other edit.

    $('.myTableStyle tbody.ui-datatable-data tr td span.ui-row-editor span.ui-icon-cancel').each(function(){
      $(this).click();
    });
    

提交回复
热议问题