Don't know how to check if modal Panel has been opened or not.
<a4j:commandButton id="backButtonId" value="#{msg.back}"
      action="#{someCommonAction}"
      oncomplete="if (  MyModalPanel Has Been Opened) #{rich:component('MyModalPanel').开发者_如何学JAVAhide() else Nothing;"
                           />
How can i do it with javascript but not using managed beans?
thank you for your answers in advance.
You could use jQuery.is() for this wherein you check if the element is :visible.
oncomplete="if (#{rich:component('MyModalPanel')}.is(':visible')) #{rich:component('MyModalPanel')}.hide();"
But this is useless. It doesn't harm to call hide() on an already hidden modal panel.
oncomplete="#{rich:component('MyModalPanel')}.hide();"
The following should do the trick for you:
#{rich:component('MyModalPanel')}.shown
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论