PrimeFaces数据表[重复]

问题描述

|                                                                                                                   这个问题已经在这里有了答案:                                                      

解决方法

        在这里,你去火影忍者... 首先,您需要使用具有id的对象填充表 比在表中添加一个“删除”列
<p:column headerText=\"Delete\">
       <p:commandLink ajax=\"true\" action=\"#{hoursReportBean.removeEntity}\" update=\"@form\" process=\"@this\" styleClass=\"ui-icon ui-icon-trash\">
           <f:setPropertyActionListener
                 target=\"#{hoursReportBean.selectedHourReportsToDeleteFromTable}\"
                 value=\"#{hourReport}\" />
       </p:commandLink>
</p:column> 

public String removeEntity(){
...
use the id of the object selectedHourReportsToDeleteFromTable.getId() in order to delete it from the list
...

}
拉森甘     

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...