JSF 2 / primefaces: p: панель не отображается с помощью ajax?

Я не уверен, нормально это поведение или нет.
Im hoping that my panel will be rendered only after clicking on a button that triggers an ajax request.

Not using Ajax works fine :

  1. p:panel id="myPanel" rendered="#{myBean.flag}"
  2. p:commandButton ajax="false" action="#{myBean.setFlagToTrue}"
  3. before clicking the button, the myPanel is not displayed (flag = false)
  4. clicking the button, will set the flag to true, and myPanel is rendered fine

Using ajax fails :

  1. p:panel id="myPanel" rendered="#{myBean.flag}"
  2. p:commandButton ajax="true" action="#{myBean.setFlagToTrue}" update="myPanel"
  3. before clicking the button, the myPanel is not displayed (flag = false)
  4. clicking the button, will set the flag to true (as displayed by my log file), and myPanel is not rendered

I've tried omitting the rendered attribute, and indeed the ajax works fine.
Я могу сказать это, глядя на изменения, отраженные внутри панели.

13
задан S1LENT WARRIOR 19 March 2013 в 05:16
поделиться