How to use OmniFaces Ajax.updateColumn() or Ajax.updateRow() via p:ajax

只谈情不闲聊 提交于 2019-12-02 01:52:05

The key point is that you've got to have a handle to the UIData component somehow so that you can pass it to Ajax#updateColumn(). In your particular case, easiest way would be to get it by event.getComponent() with help of Components#getClosestParent().

UIData tripDatesDataTable = Components.getClosestParent(event.getComponent(), UIData.class);
// ...
Ajax.updateColumn(tripDatesDataTable, 1);

Note that you can also just get the row number this way without the need to break down the client ID.

int rowNumber = tripDatesDataTable.getRowIndex();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!