I have a JSF in which i have a functionality to delete a particular row of a grid. I am using panel grid. On click of delete button i get a confirmation dialog box on click of yes which the row should be deleted and the grid should be refreshed. I am able to delete the row however the grid does not get refreshed or clear. Below is my JSF Code. Any help will be appreciated.
<p:commandButton id="delete"
icon="ui-icon ui-icon-trash"
action="#{trafficExpenseItemsMBean.deleteTrafficExpenseItemRow}"
onclick="setSelectedRowId('rowId',#{trafficSearchResult.id})"
title="GDeleteButton">
<p:confirm header="Delete Record"
message="Are you sure about deleting this record?"
icon="ui-icon-alert"/>
</p:commandButton>
<p:confirmDialog global="true" showEffect="fade">
<p:commandButton title="GDelYesButton" value="Yes" styleClass="ui-confirmdialog-yes"/>
<p:commandButton title="GDelNoButton" value="No" onclick="PF('confirmation').hide()" styleClass="ui-confirmdialog-no" />
</p:confirmDialog>