我在一个应用程序中使用jsf到达面.我正在使用rich:modalPanel弹出阅读一些细节,并在服务器响应后使用a4j命令按钮提交tha面板我想隐藏modalPanel但不知道如何,
我仍然在尝试解决方案,请帮忙
富modalPanel的代码是这样的.
<rich:modalPanel id="panelID" minHeight="200" minWidth="450" height="200" width="500"> <a4j:commandButton reRender="sampleID" action="#{SomeTestAction}" image="sample-button.gif"/> </rich:modalPanel>
解决方法
这很简单,你可以写:
**UPDATED**
这个解决方案更好,因为你不需要javaScript.
<a4j:commandButton reRender="sampleID" action="#{SomeTestAction}" image="sample-button.gif"> <rich:componentControl for="panelId" operation="hide" event="onclick" /> </a4j:commandButton>
或者使用javaScript
<a4j:commandButton reRender="sampleID" action="#{SomeTestAction}" image="sample-button.gif" oncomplete="javascript:Richfaces.hideModalPanel('panelId');"/>
或者您可以提交表单,弹出窗口消失.
<a4j:commandButton reRender="sampleID" action="#{SomeTestAction}" image="sample-button.gif" oncomplete="document.getElementById('Id_form').submit();"/>:
其中“Id_form” – 是表格的id,其中< rich:modalPanel>显示.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。