I am facing and issue while rendering my plots.
<h:form id="form1">
<a4j:commandButton id="b1"
value=" HeatMap " action="#{bean.heatMap}"
oncomplete="plotHeatMap('#{bean.heatMapData}')"
render="fullPage" />
</h:form>
<h:form id="form2">
<a4j:commandButton id="b2"
value=" BarChart " action="#{bean.barChart}"
oncomplete="plotBarChart('#{bean.barChartData}')"
render="fullPage" />
</h:form>
The user has to select first some input data which gets set to bean and then click on either of these buttons.This will calculate few things and fetch the calculated data from bean and render and the corresponding plot.The plots are created using D3.js
I have 2 issues here: 1. Buttons work on second click but not on first.
2.The data fetched in the previous execution is rendered on the first click and actual data is rendered on the next click.
I have cleared the all the lists in the bean as well as the JavaScript function.
I am not able to figure out the reason for such behavior. Please advice.