In my web application, I'm trying to make a simple page where there is a input, a command button, and one panel and a pieChart (inside panel). The panel starts not rendered (there is a MB and a boolean att "canShowPanel" that starts false). When the user clicks the commandButton, a method is called (actionListener) and canShowPanel is set to true, and the panel is updated. All works (the panel and the pieChart are rendered) BUT, the event (itemSelect) is not fired when the user clicks at pieChart slice. I tested start canShowPanel with true value (i.e. all is showed at begin), and all works including the event.
Summarizing: If the pieChart is not rendered at begin and after is rendered the events are not triggered. That is normal behavior? My code is below, but it can be tested with primefaces demos. Only put pieChart inside a panel (outputPanel, panel...) and make it be rendered after. Useful information: the piechart is populate in MB
PS. Running on PrimeFaces 3.6-SNAPSHOT and Mojarra 2.1.7 (SNAPSHOT 20120206) (well... apache tomcat 7...)
MY XHTML (a fragment)
<h:form>
<h:inputText value="#{logosUserViewMB.question}" tabindex="0" />
<p:commandButton icon="ui-icon-search" ajax="true" global="true"
actionListener="#{logosUserViewMB.doSearch()}"
update=":resultContainer">
</p:commandButton>
</h:form>
<p:outputPanel id="resultContainer">
<h:form prependId="false">
<p:outputPanel id="chartContainer" rendered="#{logosUserViewMB.canShowPanel}">
<p:pieChart id="pieChart" lazy="true"
value="#{logosUserViewMB.questionResultView.pieModel}"
legendPosition="w" title="No tit yet"
style="width:400px;height:300px;border:none">
<p:ajax event="itemSelect" listener="#{logosUserViewMB.itemSelect}" global="true"/>
</p:pieChart>
</p:outputPanel>
</h:form>