pass params to primefaces confirmation dialog box

<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>

你可能感兴趣的:(primefaces)