【发布时间】:2011-04-29 11:22:55
【问题描述】:
单击按钮时,我需要在对话框中显示 JSF 验证消息,但应显示对话框而不是隐藏。
<h:form prependId="false">
<h:panelGrid columns="1" cellpadding="5">
<p:commandButton value="Modal" onclick="dlg2.show();" type="button" />
</h:panelGrid>
<p:dialog header="Modal Dialog" widgetVar="dlg2" modal="true" height="200" width="400">
<h:panelGrid columns="1" >
<p:messages />
<p:inputText id="txt" value="#{converterBean.doubleValue}" required="true"/>
<p:commandButton ajax="false" value="Submit" action="#{converterBean.submit}" />
</h:panelGrid>
</p:dialog>
</h:form>
【问题讨论】:
标签: jsf