it seems like there is a bug with charts in dynamic non-cached tab view. Reproduction example:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<f:view contentType="text/html">
<h:head>
</h:head>
<h:body>
<h:form>
<p:tabView dynamic="true" cache="false">
<p:tab title="Test1">
<p:lineChart id="myChart"
value="#{myController.lineChartModel}"
/>
</p:tab>
<p:tab title="Test2">
Some content.
</p:tab>
</p:tabView>
</h:form>
</h:body>
</f:view>
</html>
Code: Select all
package de.volkswagen.ais.va.admin.ui;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import org.primefaces.model.chart.CartesianChartModel;
import org.primefaces.model.chart.ChartModel;
import org.primefaces.model.chart.LineChartSeries;
@ManagedBean
@RequestScoped
public class MyController {
public ChartModel getLineChartModel() {
CartesianChartModel model = new CartesianChartModel();
model.addSeries(new LineChartSeries("my series"));
model.getSeries().get(0).set(1, 10);
model.getSeries().get(0).set(2, 15);
return model;
}
}
Please, try to reproduce the issue.
Steffen Harbich