我有这样的代码:
<h:form>
<h:button value="SHOW" onclick="PF('myPanel').show()" />
<p:dialog header="MyPanel" widgetVar="myPanel">
<h:outputText value="Resistance to PrimeFaces is futile!" />
</p:dialog>
</h:form>单击该按钮只会闪烁对话框--打开,然后立即关闭。我也尝试使用JSF commandButton,结果相同。使用primefaces按钮可以按预期工作,那么这里缺少的JSF按钮是什么?
发布于 2017-04-07 04:38:52
请改用<p:commandButton>。
<p:commandButton value="Basic" type="button" onclick="PF('dlg1').show();" />https://stackoverflow.com/questions/34729133
复制相似问题