liferay中的重定向来自beanclass

时间:2013-02-22 16:32:24

标签: java jsf jsf-2 liferay liferay-6

如何使用Liferay从beanclass将一个页面重定向到另一个页面?

以下是代码:

LiferayFacesContext portletFacesContext = LiferayFacesContext.getInstance();
portletFacesContext.getExternalContext().redirect("NewFile");

执行此代码时,会显示一条消息“未找到页面”。这两个文件都存在于JSF portlet的liferay项目的View文件夹中。

1 个答案:

答案 0 :(得分:-1)

您的代码片段显示您正在混合PortletFacesContext和LiferayFacesContext。请确保您使用Liferay Faces罐子(例如liferay-faces-portal.jar和liferay-faces-bridge-impl.jar)而不是来自portletfaces.org的旧罐子

我建议你只使用LiferayFacesContext。话虽如此,您是否尝试在同一门户网站页面上的同一个portlet中重定向到不同的JSF视图?或者您是否尝试重定向到其他门户网站页面?

相关问题