Time for action – creating dialog with a registration form
In this section, we will demonstrate how to use forms in Dialog components and close the dialog conditionally such as in a successful form submission.
Create a dialog containing a user Registration Form using the following code:
<p:messages id="globalMsgs" globalOnly="true" autoUpdate="true"/> <h:outputLink id="registerLink" value="javascript:void(0)" onclick="registrationDlg.show()" title="Registration"> <p:outputLabel value="Register"/> </h:outputLink> <p:dialog id="registrationDlgId" widgetVar="registrationDlg" header="Registration Form" focus="registrationFormDlg:firstName"> <h:form id="registrationFormDlg"> <p:messages id="regmsgs" severity="error"/> <h:panelGrid columns="2" width="400px"> <p:outputLabel value="EmailId:"/> <p:inputText value="#{dialogController.registerUser.emailId}" required="true" label="EmailId"/> <p:outputLabel...