How can I invoke a method from backing bean before popup panel shows?
<h:commandButton value="Call the popup" action="#{bean.doSomething}" >
<rich:componentControl target="popup" operation="show" />
</h:commandButton>
<rich:popupPanel id="popup" modal="true" resizeable="true" onmaskclick="#{rich:component('popup')}.hide()">
...
</rich:popupPanel>
In this case doSomething() method doesn’t invoke.
Nest
a4j:ajaxin thecommandButtonor usea4j:commandButton. These two components have anoncompleteattribute where you could put a code that opens the popup dialog like this:This will perform an ajax request when the button is clicked and will open the popup when the request is finished.