I currently have a commandButton element in my jsp declared as follows:
<h:commandButton id="saveButton" value="Save" type="submit" action="#{backingbean.save}" onclick="window.close();" />
After clicking this button, the bean support method will be called and the popup will be closed. I do not want them to pass simultaneously. When I click the button, I prefer to call the save method first and close the window after the method returns.
I was wondering if I can close the popup inside the save method and leave the onclick event handler empty. Is it possible?
Is there a better way to close the Return AFTER method window?
source
share