PrimeFaces users were worried if we will keep the BlockUI component in the PrimeFaces Extensions. Yes, we will keep it. It was done compatible with the upcoming PrimeFaces 4.0 and got some updates / new features.
The main features:
All featutes are demonstrated in the following code snippet and the screenshot
Have fun!
The main features:
- Page blocking. The entire page can be blocked if you don't define the target attribute.
- Non-centered message. A non-centered message is defined by the css and centerX / centerY attributes. Furthermore, you can use the cssOverlay attribute to style the overlay (half-transparent mask).
- Auto-unblocking. The timeout attribute is helpful for auto-unblocking. It defines time in millis to wait before auto-unblocking.
All featutes are demonstrated in the following code snippet and the screenshot
<p:commandButton value="Block this page!" type="button"
onclick="PF('blockUIWidget').block()"/>
<pe:blockUI widgetVar="blockUIWidget"
css="{top: '10px', left: '', right: '10px', cursor: 'wait'}"
cssOverlay="{backgroundColor: 'red'}"
timeout="2000"
centerY="false">
<h:panelGrid columns="2">
<h:graphicImage library="images" name="ajax-loader1.gif"
style="margin-right: 12px; vertical-align: middle;"/>
<h:outputText value="This is a non-centered message. Please wait..." style="white-space: nowrap;"/>
</h:panelGrid>
</pe:blockUI>
Have fun!