Problem p:lineChart into p:dialog

UI Components for JSF
Post Reply
darkrim
Posts: 2
Joined: 14 Nov 2011, 13:13

14 Nov 2011, 13:26

Hello,

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 ?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Nov 2011, 13:29

Try 3.0.M4

darkrim
Posts: 2
Joined: 14 Nov 2011, 13:13

17 Nov 2011, 12:55

Hello,

Thank you for your answer and sorry to post so lately.

I tried the 3.0.M4 but I generated a lot of problems in my project so I keep the 2.2.1 version.

I tried other things than p:dialog like a p:lightbox or a simple div. It works but I really want to use a p:dialog to be inline with the other functionalities.

Did you have an idea of the problem? I tried to put wmode = "opaque" but nothing changes.

For information, my browser test is IE 8.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests