Korzystając z formatu A4J, Richfaces w aplikacji internetowej, muszę otworzyć nowe okno przeglądarki, gdy użytkownik kliknie na <a4j:commandButton>
.Otwórz nowe okno w a4j: commandButton
Myślę, że będę musiał użyć window.open(URL, ...)
. Gdzie powinienem to umieścić?
Moi <a4j:commandButton>
wygląda następująco:
<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>