我正在創建一個primfaces portlet。從我的view.xhtml中調用我的bean類中的Submit方法。我想在輸入上重定向視圖庫。Liferay Primefaces Portlet重定向問題
下面是提交方法,我的代碼片段:
Submit(){
try {
FacesContext.getCurrentInstance().getExternalContext().redirect("/views/Success.xhtml");
} catch (IOException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}
它簡單地添加到本地主機URL爲http://localhost:8081/views/Success.xhtml
。我想我可能錯過了一些重要的事情。如果是的話,應該實現一些渲染階段的方法,我怎麼去做,以便它爲該頁面創建渲染網址。