Trigger/activate the RowEditor from bean for a primefaces In-Cell editing enabled p:dataTable

前端 未结 9 946
时光说笑
时光说笑 2021-01-02 10:16

I have a primefaces p:dataTable with InCell editing enabled and want to trigger/activate the RowEditor for the newly added row.

Excerpt of XHTML

9条回答
  •  北荒
    北荒 (楼主)
    2021-01-02 10:25

    If you have only one data table in the facelet try to use this

    oncomplete="jQuery('.ui-datatable-data tr').last().find('span.ui-icon-pencil').each(function(){jQuery(this).click()});
    

    Add this to the command button. This should work.

提交回复
热议问题