JSF 2 / primefaces : p:panel not rendered with ajax?

后端 未结 1 616
感情败类
感情败类 2020-12-28 08:37

Im not sure if this behaviour is normal or not.
Im hoping that my panel will be rendered only after clicking on a button that triggers an ajax

相关标签:
1条回答
  • 2020-12-28 09:11

    put your panel with conditional rendering inside another and update it. Like this:

    <p:outputPanel id="toUpdate">
      <p:panel id="myPanel" rendered="#{myBean.flag}">
      </p:panel>
    <p:outputPanel>
    
    <p:commandButton update="toUpdate"/>
    

    This is a known issue. The element can't be updated if it doesn't exist in DOM.

    0 讨论(0)
提交回复
热议问题