0

ICEFaces 1.8を使用しており、新しいURLへの転送を実行したいのですが、新しいウィンドウで開きたいと思います。現在、次のように新しいウィンドウへのリダイレクトを実行できます。

public static void redirectToUrl(String urlPath) {
    if (urlPath != null) {
        try {
            final String url = FacesUtil.getContextPath() + urlPath;

            final StringBuffer jsCommand = new StringBuffer();
            jsCommand.append("window.document.location.href='").append(url).append("';");

            JavascriptContext.addJavascriptCall(FacesContext.getCurrentInstance(), jsCommand.toString());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}

しかし、同様のアプローチを使用してフォワードは可能ですか?

4

1 に答える 1

0

試してみてくださいwindow.open(url)

于 2010-04-01T15:02:14.263 に答える