【发布时间】:2013-06-03 15:31:04
【问题描述】:
我使用对话框来显示时事通讯。第一次,一切正常:弹出对话框,可以使用 X 和额外的按钮“关闭”关闭它
<h:form id="frmDialog">
<p:dialog header="...: NEWS :..."
widgetVar="widgetInfo" modal="true" dynamic="true">
<p:commandButton value="close" onclick="widgetInfo.hide();"/>
<p:outputPanel id="pnlNewsLetter" style="width:610px;">
<ui:include src="#{corporateManager.newsLetter}"/>
</p:outputPanel>
</p:dialog>
</h:form>
.... 当我单击按钮重新打开同一个对话框时,它会打开,但无法关闭。而不是关闭,点击 X 按钮或“关闭”按钮,对话框的整个内容被选中并且页面变得无响应 .....
<h:form>
<h:commandButton image="/newsletters/img/1karel.png" onclick="widgetInfo.show();">
<f:ajax render=":frmDialog:pnlNewsLetter"/>
<f:setPropertyActionListener value="/newsletters/2012-12-21.html" target="#{corporateManager.newsLetter}"/>
</h:commandButton></h:form>
.....我尝试过使用 p:commandButton、使用 oncomplete()、closable="false"、使用 h:button、添加/删除表单标签或 id 等...
环境:Glasfish3.1.2 - Netbeans 7.3 - Primefaces 3.1 - Google Chrome 27.0.1453.94 m
【问题讨论】:
标签: primefaces dialog