Page 2 of 3

Re: gChart Broken after 6.0.13

Posted: 14 Aug 2017, 20:25
by csyperski
If you take a look at the error thrown, you can see the request string with the versions.

Code: Select all

at Class.init (http://localhost:8080/powerptc/javax.faces.resource/primefaces-extensions.js.html?ln=primefaces-extensions&v=6.1:27:133)
    at Class.prototype.(anonymous function) [as init] (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.1.4-SNAPSHOT:1953:26)
Here is my POM file.
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1.4</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>6.1.1</version>
</dependency>
If I change it to the following below, everything works fine.
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>6.0.0</version>
</dependency>

Re: gChart Broken after 6.0.13

Posted: 14 Aug 2017, 20:27
by Melloware
I found the problem and reported this bug: https://github.com/primefaces-extension ... issues/475

I fixed it if you want to try the SNAPSHOT jar found here: https://oss.sonatype.org/content/reposi ... -SNAPSHOT/

Re: gChart Broken after 6.0.13

Posted: 14 Aug 2017, 21:17
by csyperski
So I replaced that PF-ext jar file and I'm getting the following on the client side:

Code: Select all

primefaces-extensions.js.html?ln=primefaces-extensions&v=6.2:952 Uncaught ReferenceError: google is not defined
    at Class.init (http://localhost:8080/powerptc/javax.faces.resource/primefaces-extensions.js.html?ln=primefaces-extensions&v=6.2:952:9)
    at Class.prototype.(anonymous function) [as init] (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.1.4-SNAPSHOT:1953:26)
    at new Class (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.1.4-SNAPSHOT:1966:19)
    at Object.createWidget (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.1.4-SNAPSHOT:323:47)
    at Object.cw (http://localhost:8080/powerptc/javax.faces.resource/core.js.html?ln=primefaces&v=6.1.4-SNAPSHOT:308:18)
    at http://localhost:8080/powerptc/protected/admin/graphs/fillratio.html:59:2682
Am I missing a dependency on my end? Do I need to manually include a script that I'm not seeing in the docs?

BTW, thanks for your assistance!

Re: gChart Broken after 6.0.13

Posted: 14 Aug 2017, 21:40
by csyperski
So if I manually add the loader for Google Charts, everything works. Is that how things are supposed to function now, does the consuming application need to include the script?

Code: Select all

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>

Re: gChart Broken after 6.0.13

Posted: 15 Aug 2017, 13:10
by Melloware
Yes unfortunately since this script is external it is not loaded as part of the component you have to add it your the page yourself.

You can read the reason why here in this issue that was filed: https://github.com/primefaces-extension ... issues/453

We followed the same pattern the Primefaces GMap took by having you include the script once yourself.

Re: gChart Broken after 6.0.13

Posted: 15 Aug 2017, 13:49
by csyperski
OK, good to know, you may want to document that as part of the showcase, as I was looking around and didn't see that. This is also a change from previous versions, as I've didn't have the script included in the past. Thanks again for all you help! Do you have any idea on when 6.2 of pf-ext will be released?

Re: gChart Broken after 6.0.13

Posted: 15 Aug 2017, 13:59
by Melloware
For the 6.2 release I have added that script addition to the showcase example.

PFE 6.2 gets releases in lock step with PF 6.2. Based on previous PF releases I am guessing 6.2 is not for a while.

Re: gChart Broken after 6.0.13

Posted: 15 Aug 2017, 14:28
by csyperski
Is there a patch available for the current release or can the fix be back-ported to the 6.1.X branch? Thanks again!

Re: gChart Broken after 6.0.13

Posted: 15 Aug 2017, 14:49
by Melloware
PFE has typically not backported fixes. They usually say we know our 6.1 works with PF 6.1. So if PF breaks something in 6.1.4 it would get fixed in 6.2 and our original 6.1 release is always certified to match the open source PF 6.1 release.

What you can do is take that JAR I sent you and simply name it 6.1.1-patch or something like that in your ./m2 or your NExus repository and use that JAR against PF 6.1.4. It should work fine.

I know that's not a great answer but that is what the PFE manifesto has been to always have a working JAR for the community release and not for PF Elite releases.

Re: gChart Broken after 6.0.13

Posted: 15 Aug 2017, 14:57
by csyperski
Your answer is perfectly fine, I can import the 6.2-Snapshot into my maven repo. So then I'm assuming there aren't any other breaking changes with the snapshot you sent me, is it basically the 6.1.1 release with the fix for the charts, or are there other changes in the snapshot?