<p:dataTable id="idStuDataTable" var="vst" value="#{ss.searchResultList}" >
......
<p:column>
<p:commandLink id="idDeleteButton" title="Delete Student" value="delete"
oncomplete="confirmation#{vst.id}.show()"/>
<p:confirmDialog header="Delete Student Confirmation" width="360"
severity="alert" widgetVar="confirmation#{vst.id}">
<f:facet name="message#{vst.id}">
<h:outputFormat value="#{msgs.delConfirm}">
<f:param value="#{vst.name}"/>
<f:param value="#{vst.mobile}"/>
</h:outputFormat>
</f:facet>
<p:commandButton value="OK" action="#{stbean.delete}"
oncomplete="confirmation#{vst.id}.hide()" style="left:200px;">
<f:setPropertyActionListener value="#{vst}" target="#{stbean.student}" />
<f:setPropertyActionListener value="true" target="#{ss.refresh}" />
</p:commandButton>
<p:commandButton value="Cancel" onclick="confirmation#{vst.id}.hide()"
type="button" style="left:205px;"/>
</p:confirmDialog>
</p:column>
</p:dataTable>
pass params to primefaces confirmation dialog box
最新推荐文章于 2025-01-16 12:53:26 发布
本文介绍了一个使用PrimeFaces组件的学生信息管理系统中删除学生记录的功能实现。具体包括删除按钮、弹出确认对话框及对话框内的确认与取消操作。确认对话框会提示用户将要删除学生的姓名和手机号码,确保用户在进行删除操作前充分了解其后果。
1028

被折叠的 条评论
为什么被折叠?



