java - Primefaces call ConfirmDialog from Backing -
I would like to call How to do this? Thank you. In backup: If I understood my question correctly ... then I will do it like this. < Strong> XHTML Been Basically you add hidden buttons in general (with P: Confirm) and you click it through jQuery. confirmDialog via backing This code works perfectly, But how can I set the message and set the installDialog implementer through backing? There are two conditions, while:
& lt; P: command button value = "execute" icon = "ui-icon-circle-check" update = "frmContent" actionoff = "# {backing.validate}" /> & Lt; P: confirmDialog id = "cfmDlg" widgetVar = "wvCfmDlg" global = "true" & gt; & Lt; P: command button value = "yes" type = "button" style class = "ui-confirmdialog-yes" icon = "ui-icon-check" /> & Lt; P: Command Button Value = "No" Type = "Button" style class = "ui-confirmdialog-no" icon = "ui-icon-close" /> & Lt; / P: confirmDialog & gt;
Validate the public null (if (mode.equals ("1") {System.out.println ("OK" );} Other {// Call Confirmation and Set Message + Action Listener RequestContext Reference = RequestContext.getCurrentInstance (); context.execute ("wvCfmDlg.show ();");}} < / Div>
& lt; p: command button style = "display: none" widgetVar = "confirmButton" ActionListener = "# {backing .yesFunction} "& gt; & lt; p: Push "Header =" Confirmation "message =" Are you sure? "/ & Gt; & lt; / p: CommandButton & gt; & lt; p: Command button value =" Execute "actionnon =" # {backing.validate} "/>
public valid valid () {if (mode.equals ("1 ")) {System.out.println (" OK "); } Other {RequestContext reference = RequestContext.getCurrentInstance (); Context.execute ("pf ('confirmButton') jq.click () ;."); }}
Comments
Post a Comment