2013-01-31 39 views
0

我在對話框中有一個pieChart。當我點擊pieChart上的一個餅圖時,我應該可以像the example.那樣獲取餅圖的索引。不過,我得到這個錯誤:Primefaces Ajax ItemSelect事件不支持

<p:ajax> Event:itemSelect is not supported. 

這裏是代碼我使用:

<p:dialog widgetVar="pieCharts" dynamic="true" id="pieCharts" closable="true" draggable="true" minimizable="true"> 
      <p:outputPanel autoUpdate="true" > 
        <h:form prependId="false"> 
           <p:pieChart id="typePie" value="#{browse.typePie}" legendPosition="e" fill="false" showDataLabels="true" sliceMargin="2" 
              title="Type" style="width:400px;height:300px"/> 

           <p:ajax event="itemSelect" listener="#{browse.createPieForFamily}" /> 
        </h:form> 
      </p:outputPanel> 
</p:dialog> 

我怎樣才能解決這個不支持錯誤?

注:我使用primefaces 3.5RC1版本。

謝謝。

回答

1

把你的電話號碼:阿賈克斯內部號碼:餅圖

<p:dialog widgetVar="pieCharts" dynamic="true" id="pieCharts" closable="true" draggable="true" minimizable="true"> 
    <p:outputPanel autoUpdate="true" > 
     <h:form prependId="false"> 
      <p:pieChart id="typePie" value="#{browse.typePie}" legendPosition="e" fill="false" showDataLabels="true" sliceMargin="2" title="Type" style="width:400px;height:300px"> 
       <p:ajax event="itemSelect" listener="#{browse.createPieForFamily}" /> 
      </p:pieChart> 
     </h:form> 
    </p:outputPanel> 
</p:dialog> 
+0

由於問題解決了:) – Viplime