I want to use gauge.js with my jsf(primefaces) application. I dealt with primefaces components (for which, doesn't require integration) so far. Now, I want to access class property (probably through Json response) from jsf page for generating gauage. I read a solution which suggests to generate json Response but I didn't get it properly. jsFiddle by bernii shows that it requires a dynamic value for creating gauge.
<------sampleClass------>
public int func(){
return aValue; }
<-----JSF----->
<canvas id="gauge"></canvas>
<------Script----->
var gaugeTarget = document.getElementById('gauge');
var gauge = new Gauge(gaugeTwoTarget);
gaugeTwo.maxValue = 100;
gaugeTwo.set(); //how can i get value return by func() here...........
Also BalusC wrote awesome article on it(Java/JSP/JSF and JavaScript). Again m not able to implement it.
Thanks