I am beginner in FusionChart. I was trying to use your example but I am getting this error while rendering <fc:render> tag.
java.lang.ClassCastException: javax.faces.component.UIViewRoot cannot be cast to com.fusioncharts.jsf.UIChart
Can you please help me out, its extremely urgent.
Many thanks in advance.
Thanks,
Saurav
Hi,I have tried it out in my application. To use FusionCharts with JSF, you would need to create a Component. I created a component ChartTag. Let me describe how you have to do it. ( I am assuming that you have a JSF application atleast an empty one)
1. Create a charts.tld file in WEB-INF folder with the following contents:
Do not forget to include FusionCharts.js present in the FusionCharts folder. This folder will also contain the swf files required to generate the chart. I have used the xml directly here. you could give the url to the xml also.
Here I have hard-coded the xml, you could get the xml from the backing bean also.
In case you have problems with the above code, please feel free to ask questions.
Fusion Charts intergration with JSF
in FusionCharts and JSP
Posted · Report reply
Hi All,
I am beginner in FusionChart. I was trying to use your example but I am getting this error while rendering <fc:render> tag.
java.lang.ClassCastException: javax.faces.component.UIViewRoot cannot be cast to com.fusioncharts.jsf.UIChart
Can you please help me out, its extremely urgent.
Many thanks in advance.
Thanks,
Saurav