Live Chart doesn't work

UI Components for JSF
Post Reply
Will
Posts: 22
Joined: 10 Apr 2009, 09:48

10 Apr 2009, 09:54

Hi all,

i tried to use live chart in the primefaces lib but it doesn't work...

Code: Select all

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="core" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="html" %>
<%@ taglib uri="http://primefaces.prime.com.tr/ui" prefix="p" %>

<core:view>
	<html>
		<head>
			<p:resources />
		</head>
		<body>
			<div id="container">
				<p:pieChart
				id="abonnes" 
				value="#{statBean.proportionAbonnes}"
				var="item" 
				live="true" 
				refreshInterval="5000" 
				categoryField="#{item.name}" 
				dataField="#{item.value}" />
			</div>
		</body>
	</html>
</core:view>
This is my source code. The problem is that it cannot found "javax.faces.ViewState" (null) at ajax.js (line 21)...
The generated source code doesn't have <input type="hidden" id="javax.faces.ViewState" ... /> like the demo source code of a live pieChart.

What's the problem ? pieChart works when i turn live parameter false.

Thanks for all. William Durand

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

10 Apr 2009, 11:19

Basically you need an h:form encapsulating the chart.

Will
Posts: 22
Joined: 10 Apr 2009, 09:48

10 Apr 2009, 11:36

Oh thanks for all. It works now.
Have a good day.

DarkMarine
Posts: 3
Joined: 18 Apr 2009, 17:50

18 Apr 2009, 18:04

Hi,
I tried to create a LineChart using the p:lineChart tag. Everything works fine and the chart is rendered. But when i add the live="true" refreshInterval="3000" attributes then the chart is not rendered any more. I see a empty page.

I am using PrimeFaces 0.8.2 together with RichFaces 3.2.2 / MyFaces 1.2.6 and Facelets.

Thanks for help.
Best regards.

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

19 Apr 2009, 23:16

There was actually a known issue, see http://code.google.com/p/primefaces/issues/detail?id=53

This is fixed as of 19 April. You can grab the fix using the 0.8.3-SNAPSHOT or wait for 0.8.3 release scheduled on 22th of April.

0.8.3-SNAPSHOT's are deployed here;
http://repository.prime.com.tr/org/prim ... -SNAPSHOT/

DarkMarine
Posts: 3
Joined: 18 Apr 2009, 17:50

20 Apr 2009, 09:58

It works now, thanks :)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 37 guests