Jsf 查看面板时未调用Primefaces commandButton
我在使用primefaces调用commandButton时遇到一些问题 这是我的密码Jsf 查看面板时未调用Primefaces commandButton,jsf,primefaces,commandbutton,Jsf,Primefaces,Commandbutton,我在使用primefaces调用commandButton时遇到一些问题 这是我的密码 <h:form> <some component...> <p:ajax update="tipe" oncomplete="PF('tipePanel').show()"/> </some component...> <p:panel id="tipe" visible="false" rendered="tru
<h:form>
<some component...>
<p:ajax update="tipe" oncomplete="PF('tipePanel').show()"/>
</some component...>
<p:panel id="tipe" visible="false" rendered="true" widgetVar="tipePanel">
<p:commandButton value="Add"
actionListener="#{soal.addDetailForm()}"
rendered="true" />
</p:panel>
</h:form>
问题是显示面板时无法调用该按钮,但如果我从一开始就将面板visible=“true”
放入,则可以调用该按钮。知道为什么吗
当显示面板时,我应该如何使按钮工作。谢谢可见=“假”和呈现=“真”是什么意思?如果按钮未触发,则表示页面某处出现异常,请尝试替换为h:commanbutton以进行测试,并查看是否触发了按钮?如何更改组件的可见性?我自己就知道了。我只需要添加属性async=“true”就可以了!