Aug 7, 2008 11:12 AM
Chart data is loaded in an unselected tabbedPaneItem
Hello,
I use a q:chart in a tabbedPaneItem and the chartModel is loaded even if the tabbedPaneItem is never selected.
In my JSF page (in a q:tabbedPaneItem):
<q:chart width="400" height="300"
model="#{myBean.chartModel}"
style="background: #fff" view="pie" >
<q:chartNoDataMessage text="No data" />
</q:chart>
In my bean :
public ChartModel getChartModel(){
System.out.println("LOADING CHART MODEL");
HashMap<String, Double> data = new HashMap<String, Double>();
data.put("part 1", 20.0);
data.put("part 2", 40.0);
data.put("part 3", 80.0);
PlainModelImpl model = new PlainModelImpl();
PlainSeriesImpl series = new PlainSeriesImpl();
series.setData(data);
series.setId("Test Chart");
model.addSeries(series);
return model;
}
When my page displays, the getChartModel() is called.
This problem impact the performance of my application. I use quipukit1.5, myfaces1.1.4 and Tomcat.
Regards,
Ludovic