Popup Richfaces Panel
How can I call the method from the backup bean in front of the popup panel?
<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, the doSomething () method does not call.
+3
source to share
3 answers
Nest a4j:ajax
in commandButton
or use a4j:commandButton
. These two components have an attribute oncomplete
where you can put code that opens a popup dialog, for example:
<a4j:commandButton value="Call the popup" action="#{bean.doSomething}" oncomplete="#{rich:component('popup')}.show()">
</a4j:commandButton>
This will execute the ajax request when the button is clicked, and open a popup when the request is complete.
+5
source to share