I have a problem with use of a linechart into a p:dialog.
My Primefaces version is 2.2.1.
I have a commandButton which call a method to initialize the data for the chart. At the end of the method, the dialog box is shown but it is a blank page. There is the place for the chart but nothing appears.
When I try to put the chart out of the dialog box, there is no problem the chart appears correctly.
I make some research but I found nothing in Google about this problem.
Here is the code use in my xhtml page :
Code: Select all
<p:commandLink action="#{relancesManagedBean.createGraphique(relance.codeClient)}" oncomplete="dialogGraph.show()" update="panelGraph" process="@this">
<p:graphicImage value="/resources/img/graphique.jpg" alt="Générer le graphique" title="Générer le graphique" styleClass="tabImg"/>
</p:commandLink>
Code: Select all
<p:outputPanel id="panelGraph">
<p:dialog header="Graphique" widgetVar="dialogGraph" resizable="true" rendered="#{relancesManagedBean.stats != null}" closeOnEscape="true" width="800">
<p:lineChart value="#{relancesManagedBean.stats}" rendered="#{relancesManagedBean.stats != null}" var="stat" xfield="#{stat.date}">
<p:chartSeries label="CA" value="#{stat.chiffreAffaire}" />
<p:chartSeries label="Montant" value="#{stat.montantDuTtc}" />
</p:lineChart>
</p:dialog>
</p:outputPanel>
Is anybody have an idea of the problem ?