6
我有它的工作的下方輸出鏈接打開新窗口任意網址:如何使用PrimeFaces按鈕
<h:outputLink value="#{verDocumentoController.url()}" target="_blank">
show document
</h:outputLink>
它打開在一個新窗口Bean屬性得到一個URL。
但是,我想將鏈接變成PrimeFaces look'n'feel中的按鈕。我試過如下:
<p:commandButton value="show document" action="#{verDocumentoController.url()}"
onclick="form.target='_blank'" ajax="false" />
但它只是重新打開一個新窗口中的當前頁面,而不是指定爲bean屬性的URL。無論如何我怎麼能做到這一點?