0

私の Web アプリケーションでは、入力、コマンド ボタン、および 1 つのパネルと pieChart (パネル内) がある単純なページを作成しようとしています。パネルはレンダリングされずに開始されます (MB と false で始まるブール属性「canShowPanel」があります)。ユーザーが commandButton をクリックすると、メソッドが呼び出され (actionListener)、canShowPanel が true に設定され、パネルが更新されます。すべての作品 (パネルと pieChart がレンダリングされます) が、ユーザーが pieChart スライスをクリックしても、イベント (itemSelect) は発生しません。start canShowPanel を true 値でテストし (つまり、開始時にすべてが表示されます)、イベントを含むすべての動作をテストしました。

要約: pieChart が開始時にレンダリングされず、レンダリング後にレンダリングされない場合、イベントはトリガーされません。それは正常な動作ですか?私のコードは以下にありますが、primefaces デモでテストできます。パネル (outputPanel、パネル...) 内にのみ pieChart を配置し、後でレンダリングします。有用な情報: 円グラフは MB 単位で表示されます

PS。PrimeFaces 3.6-SNAPSHOT および Mojarra 2.1.7 (SNAPSHOT 20120206) で実行されています (まあ... apache tomcat 7...)

MY XHTML (フラグメント)

  <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>         

4

0 に答える 0