O'Reilly logo

PrimeFaces Beginner's Guide by K. Siva Prasad Reddy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – blocking the form

In this section, we will demonstrate how to block a specific region, such as a form, while the form submission background process is still running.

  1. Create a user Registration Form and BlockUI component to block the form while registration is inprocess using the following code:
    <p:growl autoUpdate="true"/> <h:form id="form1"> <p:panel header="BlockUI"> <h:panelGrid columns="2"> <h:outputLabel value="EmailId" /> <p:inputText value="#{blockUIController.registerUser.emailId}"/> <h:outputLabel value="Password" /> <p:password value="#{blockUIController.registerUser.password}"/> <p:commandButton id="submitBtn" value="Register" actionListener="#{blockUIController.doRegister}"/> </h:panelGrid> </p:panel> <p:blockUI block="form1" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required