1

I am using the Primefaces Extensions BlockUI component for global ajax events like this:

<p:ajaxStatus onstart="PF('globalBlockUI').block({ fadeIn: 0 })" onsuccess="PF('globalBlockUI').unblock({ fadeOut: 0 })"/>

<pe:blockUI id="globalBlockUI" widgetVar="globalBlockUI"
            css ="{}"
            cssOverlay="{}">
...
</pe:blockUI>

I would like to disable the fade effect. Setting the {fadeIn: 0} option like in JQuery seems to be ignored.

How do I disable the fade effect?

Thomas
  • 620
  • 7
  • 19

1 Answers1

1

Try adding this to your page...

<script type="text/javascript">
   $.blockUI.defaults.fadeIn = 0;
</script>

I have also created this ticket so those attributes get added as first class citizens on the component itself: https://github.com/primefaces-extensions/primefaces-extensions.github.com/issues/594

UPDATE: I have committed a fix for the above GitHub ticket. So you will be able to do...

<pe:blockUI id="globalBlockUI" fadeIn="0" fadeOut="0"/>
Melloware
  • 10,435
  • 2
  • 32
  • 62
  • Hi Melloware, thanx a lot for your fast reply. Setting the defaults seems to work for some places, but not for all. Im not sure why. Seems if there is a tartget=":something" set, then the defaults work. It seems not to work if the target property is left out as it is done in my initial example. I did not test your new version though. I will give feedback once I did that. – Thomas Jul 23 '18 at 07:58
  • OK great. Definitely let me know how it goes after you test the PFE SNAPSHOT build with the new properties in it. – Melloware Jul 23 '18 at 11:57