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
Hello Ludovic,
According to the documentation if attribute loadingMode of the tag q:tabbedPane is set to client, then content of all tabs loads when the page loads. To delay tab content loading you can use server or ajax loading mode. In this case the contents of the appropriate tab will only be loaded when the user switches to that tab.
Please contact us if you have any questions.
Sincerely,
Ilya Musihin
Hello,
I use ajax loading mode of course.
The problem is only on q:chart components, all my dataTables are loaded only when the tabbedPaneItem is selected.
Regards,
Ludovic Simon
Hello Ludovic,
We have investigated information that you provided. That was a bug in our Chart implementation and the fix will be available in the next release.
If you need a prerelease version with this fix, please contact quipukit-support AT teamdev DOT com
Sincerely,
Ilya Musihin