Using A4J, Richfaces in a web application, I need to open a new browser window when the user clicks on the <a4j:commandButton>
.
I think I will have to use window.open(URL, ...)
. Where should I put it?
My <a4j:commandButton>
looks like this:
<a4j:commandButton id="elementDetailsButton"
onclick="if (!confirm('Are you sure? Unsaved data will be lost')) { return false; }"
action="#{myBean.elementDetailsAction}"
value="Element Details">
<a4j:actionparam name="elementDetailsString"
value="getElementDetails()"
assignTo="#{myBean.elementDetails}" noEscape="true">
</a4j:actionparam>
</a4j:commandButton>