Search code examples
primefacesjsf-2primefaces-extensionsblockui

Primefaces Extensions BlockUI in Dialog


Primefaces 7.0, primefaces-extensions 7.0.2, JSF 2.1.19

Hello,

I want to use pe:blockUI for p:dialog and I figured out I can not use the "normal" outside blockUI I use in the whole application, because it does not block the dialog and so the user can click random stuff during the ajax request. So I use a separate blockUI element in the dialog to also block the dialog inputs.

That is working, the only problem I have is that he message part of the blockUI ("please wait") should be gone without any replacement (because the general blockUI message works fine and two are too much).

How can this be done?

    <p:dialog id="antragKoopUserSearch" widgetVar="antragKoopUserSearch" height="555" width="830" modal="true" closable="true">
    <f:facet name="header">Benutzer suchen zum Weitergeben</f:facet>
    <h:form id="modalPanelForm">
        <pe:blockUI id="buiModal" widgetVar="buiModal" target="antragKoopUserSearch" />
        <p:ajaxStatus id="antragKoopUserSearchStatus" onstart="PF('buiModal').block();" oncomplete="PF('buiModal').unblock();" />

thx


Solution

  • You can hide it like this:

    <pe:blockUI css="{opacity: 0}">
        asd
    </pe:blockUI>
    

    You do need that "asd" there or at least something, otherwise it won't work, at least on my version 6.1.1.