I've got the integration working well with a simple interactive column chart. I followed the demos to have an itemSelectListener setting a string variable in the backingbean and updating an outputText tag with the updated message. This all works on the first click. The display shows which bar of the chart I clicked. After that, though, subsequent clicks hit the itemSelect method in the backing bean (logging to the console), but do not update the outputText region.
Any ideas?
Here are snippets from my code:
xhtml:
Code: Select all
<h:form>
<h:outputText id="columnInfo" value="#{startUpGeneralBB.message}"/>
<p:columnChart value="#{startUpGeneralBB.generalModule.moduleSteps}" var="column" xfield="#{column.name}"
maxY="100"
itemSelectListener="#{startUpGeneralBB.itemSelect}" update="columnInfo">
<p:chartSeries label="Percent Complete" value="#{column.percent}"/>
</p:columnChart>
</h:form>
Code: Select all
public void itemSelect(ItemSelectEvent event) {
log.debug("Item: " + event.getItemIndex() + ", series: " + event.getSeriesIndex());
message = "Item Index: " + event.getItemIndex();
}