Page 1 of 2

pe:gChart whitescreen

Posted: 04 Apr 2017, 10:09
by zenosaurusflex
Hi

when loading a page with a pe:gChart my browser turns white and I get the following browser console error:

"Uncaught Error: The container #form:j_id_6c:chartForm:gChart is not defined."

After refreshing the page (F5) everything works fine, the chart is displayed correctly etc.

Code: Select all

<h:form id="chartForm" style="text-align: center;">

		<div id="gChartDiv">
			<pe:gChart value="#{data.testModel}" title="Test"
				rendered="#{!data.noDataYet}" id="gChart">
			</pe:gChart>
		</div>
	</h:form>
Any help apprectiated

Re: pe:gChart whitescreen

Posted: 05 Apr 2017, 13:02
by Melloware
What version of PFE and PF are you using?

Re: pe:gChart whitescreen

Posted: 05 Apr 2017, 13:25
by zenosaurusflex
PFE: 4.0.0
PF: 5.3

Re: pe:gChart whitescreen

Posted: 05 Apr 2017, 13:28
by Melloware
OK unfortunately that is an old version and there have been some fixes to PFE and gChart since then. Is there any way you can try with PF + PFE 6.0?

Re: pe:gChart whitescreen

Posted: 05 Apr 2017, 13:59
by zenosaurusflex
Sadly this isn't an option right now.

Re: pe:gChart whitescreen

Posted: 05 Apr 2017, 14:26
by Melloware
OK well that means you will probably have to debug and patch PFE 4.0.0 yourself if you can fix it. Or look at the latest code in Github for GChart and try and backport it to PFE4.0.0.

Sorry!

Re: pe:gChart whitescreen

Posted: 05 Apr 2017, 14:45
by zenosaurusflex
Alright, thanks anyway :^ )

Re: pe:gChart whitescreen

Posted: 05 May 2017, 02:15
by Melloware
We just made major upgrades to the chart JS from Google that may resolve your problem. You just need to copy 1 JS file and 1 Java file into 4.0.0 and build. We had another user do that in 3.0.0 and he confirmed it fixed all his chart issues. You can read about it here:

https://github.com/primefaces-extension ... issues/452

Re: pe:gChart whitescreen

Posted: 08 May 2017, 11:27
by zenosaurusflex
I replaced both files (gchart.js, gchartRenderer.java), the view now displays everything but the gChart.

Console is giving me following errors
https://gyazo.com/e405c377770a0346b18d9ef703a26f04

After refreshing the page (f5) gChart displays but I get the same warnings as the user on github
https://gyazo.com/34dfd885c2a29b0382ccd2e3aff06cbf

Re: pe:gChart whitescreen

Posted: 08 May 2017, 13:13
by Melloware
Did you add this script to your XHTML page...

Code: Select all

<script src="https://www.gstatic.com/charts/loader.js"></script>
That is the new charts javascript from Google. And from your screenshot of your error I am still seeing it say PFE 4.0.0. You didn't build a 4.0.1 or something to differentiate to make sure it wasn't loading your old PF 4.0.0 JAR?