delete HtmlColumn on clicking HtmlCommandButton which is in the column itself

后端 未结 1 927
自闭症患者
自闭症患者 2021-01-23 10:10

I have generating a HtmlCommandButton in backing bean. By clicking that button I want to delete a HtmlColumn from a HtmlDataTable which wa

相关标签:
1条回答
  • 2021-01-23 10:59

    Use HtmlDataTable binding in backing bean.

    <h:dataTable id="dataTable" binding="#{backingBean.tableComponent}" value="#{backingBean.someList}">
    

    On click action

    //---
    
    SomeObject selectedObject = (SomeObject) tableComponent.getRowData();
    
    someList.remove(selectedObject);
    
    //--
    
    0 讨论(0)
提交回复
热议问题