1

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

Ande Hofer
  • 150
  • 2
  • 14
  • 1
    Please post some code I have no idea what you are trying to do? – Melloware Jul 07 '21 at 13:19
  • Hello @Melloware I added some code. What I want is the blocking of the dialog (which is working) without the Message "Please wait..." in the center, because I have already a blocking message from another blockUI component. Why do I use 2 blockUI components? Because my default blockUI component is not able to block the dialog, I have to put a blockUI component into the dialog to block it. But I do not want the "Please Wait.." message in the center... – Ande Hofer Jul 07 '21 at 13:27
  • 1
    This is a bit of an [XY problem](https://en.wikipedia.org/wiki/XY_problem). You could instead ask why your "normal" blockUI doesn't block dialogs and fix that. It's hard to tell without seeing your markup, but you probably need to specify higher `z-index` for blocking overlays. – Vsevolod Golovanov Jul 08 '21 at 07:42
  • Hello @Vsevolud Golovanov there was a discussion about this in 2013 here: https://forum.primefaces.org/viewtopic.php?t=32133 and as I understand this it was never target to block the dialog so somehow you will need a separate element for this blocking. – Ande Hofer Jul 08 '21 at 09:52
  • 1
    @AndeHofer, that's about p:blockUI though, not pe:blockUI. And it's pretty dated. I'm using pe:blockUI in my app to block everything including dialogs, it works fine. Try styling like this: `.blockUI { z-index: 2000 !important; } .blockOverlay { z-index: 2001 !important; } .blockMsg { z-index: 2010 !important; }`. – Vsevolod Golovanov Jul 08 '21 at 12:47
  • 1
    @Vsevolod Golovanov, works!!! fantastic, I am just stunned. – Ande Hofer Jul 08 '21 at 13:52

1 Answers1

2

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.

Vsevolod Golovanov
  • 4,068
  • 3
  • 31
  • 65