This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Google Chart inside a Primefaces p:dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Google Chart inside a Primefaces p:dialog" Watch "Google Chart inside a Primefaces p:dialog" New topic
Author

Google Chart inside a Primefaces p:dialog

Mehdi Singer
Greenhorn

Joined: May 10, 2011
Posts: 4
Based on this blog entry I'm trying to display a Google Chart inside a Primefaces dialog box.

My xhtml file:


My backing bean:



My chart renderer:



With above code, when I press my button the dialog box shows up but is empty. The method `buildHistory` is called before the renderer but my chartModel is empty i.e. if I look at the source code, no row has been added to my chart. But in this particular case an empty chart should be displayed anyway.

If I add `ajax="false"` to my button, the dialog box doesn't show up at all but my chartModel is populated i.e. in the source code I see the code of my chart and if I copy paste the code of the chart into an HTML file it works...

Note also that if I don't put the chart inside the dialog box I get the expected result:



Am I missing something? Can someone give me a hint?

I'm running Glassfish 3.1.1, JSF 2.1, Primefaces 3.4, Mojarra 2.1.6

Thanks for your help !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Google Chart inside a Primefaces p:dialog
 
Similar Threads
Trouble updating primefaces component w/ajax
Reset the value of an input text using PrimeFaces 2.2.1
SEVERE: javax.faces.FacesException: java.lang.ClassCastException:
Is it possible to insert Somecontents into div tag supplied by google Visulization APIS??
How do you update / replace or re-render JSF components from a click on another component?