我有一个带有小部件var的p:dialog
和一个仅通过说PF(widgetvarval).show()
即可打开该对话框的按钮,在Firefox和chrome上却像超级按钮,但在IE上却没有。它给出错误消息show()
未定义..
对话框:
<p:dialog modal="true" responsive="true"
onHide=" window.close();" widgetVar="edit#{student.id}"
resizable="false"
onShow=" setTimeout(() => {
this.showDialog = true;
}, 0);">
</p:dialog>
和按钮:
<p:commandButton update="@form" process="@this"
oncomplete="PF('edit#{student.id}').show();" event="onclick"
</p:commandButton>
我在IE中遇到错误:
错误:无法获取未定义或空引用的属性“ show”
无论如何,我可以使其在IE上运行吗?
答案 0 :(得分:0)
我正在使用这样的作品。
<p:commandButton value="Hi !" onclick="PF('dlg').show();"></p:commandButton>
<p:dialog widgetVar="dlg" modal="true" >
<h:outputLabel value="Hello" />
</p:dialog>