开发者

URL in popup JSF

i have following scenario first i need to send request to back end,that will return a URL..i need to open the URL in the popup.. i am confused for this

i have tried o开发者_如何学Gopening popup both using the prime-faces and web flow but i don't have clearly how to open popup using new url each time

we are using JSF, prime faces and spring webflow


Use JavaScript's window.open function.

E.g.

<h:form>
    <h:commandButton value="Submit" action="#{bean.submit}">
        <f:ajax render="popup" />
    </h:commandButton>

    <h:panelGroup id="popup">
        <ui:fragment rendered="#{not empty bean.url}">
            <script>window.open('#{bean.url}');</script>
        </ui:fragment>
    </h:panelGroup>
</h:form>

with

private String url;

public void submit() {
    this.url = sendRequestToServiceAndRetrieveURL();
}

// ...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜