Widget for var 'XXX' not available!

UI Components for JSF
Post Reply
frioux
Posts: 21
Joined: 02 Nov 2015, 23:32

15 Feb 2019, 23:15

Any workaround for this so it don't break everything?

https://github.com/primefaces/primefaces/issues/3425

Primefaces 6.2
Last edited by frioux on 18 Feb 2019, 15:59, edited 1 time in total.

kukeltje
Expert Member
Posts: 9377
Joined: 17 Jun 2010, 13:34
Location: Netherlands

16 Feb 2019, 13:57

What is wrong with all the alternatives ('workarounds') mentioned in the link posted by Thomas Andraschko in the issue? Several are posted there.
Ronald van Kuijk
______________________________
PrimeFaces 6.1, PrimeFaces plus 0.0.2 | JbossWildfly 10.1| Mojarra 2.2.13
Fedora 61, Firefox 'most recent'
Read the forum posting rules
Beginners: https://jsf.zeef.com/bauke.scholtz

frioux
Posts: 21
Joined: 02 Nov 2015, 23:32

18 Feb 2019, 16:08

Okay, I tried this one:

#mask {
position: fixed;
left:0; right:0; top:0; bottom:0;
}
with z-indez too, but it remove the windows scrollbar?

Answer by Oswaldo Acauan have compatibility issues with IE.

Answer by Zathrus Writer do not work on all click.

I will check the answer of jbkkd and Akshay Khandelwal.

But how I go to reactivate all the click and where I hook that? I was hoping someone faced this issue and had the best answer, this seem major.

frioux
Posts: 21
Joined: 02 Nov 2015, 23:32

18 Feb 2019, 16:41

See my other post "Problem in Chrome". This seem to be the main problem.

frioux
Posts: 21
Joined: 02 Nov 2015, 23:32

18 Feb 2019, 20:15

Wrapping all call to widget var with "if ( jQuery.isReady )" seem a decent workaround.

User avatar
Melloware
Posts: 1178
Joined: 22 Apr 2013, 15:48

19 Feb 2019, 14:39

There seems to be better global solutions than wrapping eveyr component with is Jquery.Ready. https://stackoverflow.com/questions/193 ... fore-ready
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 7.0.4 / PF Extensions 7.0.1

User avatar
Melloware
Posts: 1178
Joined: 22 Apr 2013, 15:48

19 Feb 2019, 15:08

A trick that might be more global is to do the following. use CSS to hide the page and then display it once the document is ready and thus your buttons will be ready.

CSS:

Code: Select all

html {
	/** https://stackoverflow.com/questions/9550760/hide-page-until-everything-is-loaded-advanced/9551066 */
	visibility: hidden;
}
Then add this script in your layout template so it happens on every page.

Code: Select all

<script>
$(document).ready(function() {
            document.getElementsByTagName("html")[0].style.visibility = "visible";
});
</script>
This works for me.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 7.0.4 / PF Extensions 7.0.1

frioux
Posts: 21
Joined: 02 Nov 2015, 23:32

20 Feb 2019, 19:34

Thanks you, this is a really nice solution. I plugged it on my content container only since my header work fine. I even seem to see an improvement in rendering time. I have solutions, I will see what I will do, probably this. I can produce edge case that will probably not happen in prod where a page can take 5 sec to render in Chrome and it's a bit weird to see nothing for that long, strange that firefox display it nearly instantaneously but Chrome struggle that much.

User avatar
Melloware
Posts: 1178
Joined: 22 Apr 2013, 15:48

20 Feb 2019, 19:45

No problem. I really like this trick because it actually speeds up the display time rather than the browser rendering and snapping the UI it just paints the screen once the display is actually ready.

As for why something takes 5 seconds in Chrome and 1 in Firefox it could be a certain piece of JavaScript. I have seen in the past where one browser for one particular function is way slower than the others. Typically that is IE though. :D
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 7.0.4 / PF Extensions 7.0.1

Robert09
Posts: 1
Joined: 08 Feb 2019, 08:06

11 Mar 2019, 11:53

You can't proceed like this because the click is first catched by the link before it is forwarded to the enclosing elements.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Baidu [Spider], Google [Bot] and 12 guests