Here is JSF code:
<o:chart id="categoryLineChart" model="#{categoryReports.categoriesLineChart}"
view="line"
rendered="#{categoryReports.reportRendered}"
height="#{categoryReports.scaleHeight}" width="#{categoryReports.chartWidth}"
binding="#{categoryReports.lineChartComponent}">
<o:chartNoDataMessage text="#{msg['report.nodata']}"/>
</o:chart>
And here is a part of backing bean for binding support (I post it hoping that something is missing here):
public void setLineChartComponent (Chart c) {
this.lineChart = c;
}
public Chart getLineChartComponent () {
return this.lineChart;
}
When I open page at first time everything works fine but when I open it at second time (refresh or open the same url in another tab or any other way) I get duplicate id error. Error message says that o:chartNoDataMessage
has not unique id. Here is a part of long error message:
Component ID mainForm:j_id30 has already been found in the view. ...
+id: j_id30 type: org.openfaces.component.chart.ChartNoDataMessage@26db62 +id: j_id30 type: <br/> +id: categoryPieChart type: org.openfaces.component.chart.Chart
The problem occured after I added binding attribute. If I remove it everything will work fine again (I tried).
I have 2 suggestions:
- I don't know how to use binding properly (I hope this is the case)
- There is a bug in component library