I have a code as follows:
<p:commandButton value="#{actualProductionEntry.val}" onclick="confirmation.show()"/>
<p:confirmDialog id="confirmDialog" message="Are you sure?" header="Confirm Submission" severity="alert" widgetVar="confirmation">
<p:commandButton id="confirm" value="Yes" oncomplete="confirmation.hide()" action="# {actualProductionEntry.insert(login.userid,login.uid,login.dname,login.rptid)}" update=":df:data :f1:p2 :dp:app"/>
<p:commandButton id="decline" value="No" onclick="confirmation.hide()" type="button" />
</p:confirmDialog>
Now, how can I do validation before confirmation without effecting my bean?