当我单击任何一行并单击删除链接时,会出现确认对话框,但是一旦单击该对话框,行选择就会更改。选定的行不会被删除,但其他行会被删除。请帮助修复它。
<p:column headerText="Delete" width="50" style="text-align:center">
<p:commandLink id="showDialogButton"
update=":studyPlanEditForm:display" onclick="cdDialog.show()"
value="delete">
</p:commandLink>
<p:dialog widgetVar="cdDialog" appendToBody="true"
header="Are you sure to delete this substudyplan?">
<p:panel>
<p:commandButton value="Yes" process=":studyPlanEditForm:display"
action="#{editBean.deleteSubStudyPlan(selectedRow)}"
onclick="cdDialog.hide();"
update=":studyPlanEditForm"/>
<p:commandButton value="No" onclick="cdDialog.hide();"
type="button"/>
</p:panel>
</p:dialog>
</p:column>