Problem with bootsfaces 1.3.0 and highfaces 1.3
JSF 2 Chart Component Library based on HighCharts
Brought to you by:
bauer-live
Hello,
we are using highfaces together with bootsfaces for a long time now and we now upgraded to bootsfaces 1.3.0.
Unfortunately we hit a bug, that is not yet sorted out in the 1.3 release of highfaces.
Obviously there are some header facets from bootsfaces that don't carry the attribute "name" and they are producing a NullPointerException in ChartRenderer.
We have made a fork of highfaces to continue our work, but with this little patch the thing would be solved and we could continue using the official builds:
Index: src/main/java/org/highfaces/component/chart/ChartRenderer.java
===================================================================
--- src/main/java/org/highfaces/component/chart/ChartRenderer.java (revision 34)
+++ src/main/java/org/highfaces/component/chart/ChartRenderer.java (working copy)
@@ -199,7 +199,7 @@
}
boolean needHighCharts = true;
for (UIComponent c : headFacet.getChildren()) {
- if (c.getAttributes().get("name").toString().endsWith("highcharts.js")) {
+ if (c.getAttributes().containsKey("name") && c.getAttributes().get("name").toString().endsWith("highcharts.js")) {
needHighCharts = false;
}
}
Perhaps you can integrate this change for the next release version?
Thank you very much!
Thorsten Mürell
Hello ,
thanks a lot, the fix will for sure be part of the next release; we have already pushed it into the our current snapshot so that it won't get overseen.
Thank you very much for the quick response!