0

ダイアログに pieChart があります。 pieChart の円をクリックすると、例のように円のインデックスを取得できるはずです。. ただし、次のエラーが発生します。

<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バージョンを使用しています。

ありがとう。

4

1 に答える 1

1

p:ajax を p:pieChart 内に配置します

<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>
于 2013-01-31T23:42:56.243 に答える