pe:gChart whitescreen

Community Driven Extensions Project
zenosaurusflex
Posts: 7
Joined: 04 Apr 2017, 09:50

04 Apr 2017, 10:09

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
Last edited by zenosaurusflex on 05 Apr 2017, 13:38, edited 1 time in total.

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

05 Apr 2017, 13:02

What version of PFE and PF are you using?
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.1.X / PF Extensions 6.1.5

zenosaurusflex
Posts: 7
Joined: 04 Apr 2017, 09:50

05 Apr 2017, 13:25

PFE: 4.0.0
PF: 5.3

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

05 Apr 2017, 13:28

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?
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.1.X / PF Extensions 6.1.5

zenosaurusflex
Posts: 7
Joined: 04 Apr 2017, 09:50

05 Apr 2017, 13:59

Sadly this isn't an option right now.

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

05 Apr 2017, 14:26

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!
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.1.X / PF Extensions 6.1.5

zenosaurusflex
Posts: 7
Joined: 04 Apr 2017, 09:50

05 Apr 2017, 14:45

Alright, thanks anyway :^ )

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

05 May 2017, 02:15

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
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.1.X / PF Extensions 6.1.5

zenosaurusflex
Posts: 7
Joined: 04 Apr 2017, 09:50

08 May 2017, 11:27

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

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

08 May 2017, 13:13

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?
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.1.X / PF Extensions 6.1.5

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests