【发布时间】:2013-12-16 08:58:37
【问题描述】:
如何通过 URL(在支持 bean 中)将用户重定向到 portlet 中的其他页面?我们在 JBoss 5.1.0 上使用 GateIn 3.1
通常,FacesContext.getCurrentInstance().getExternalContext().redirect("url") 就足够了,但在这里它不起作用,它不会重定向用户。
context.getApplication().getNavigationHandler().handleNavigation(context, null, page) 也不起作用。
我们希望避免为我们可以重定向到的每个可能的页面制定导航规则。
编辑:
看来a4j:commandButton 引起了一些问题,在我们用h:commandButton 替换它之后,我们被重定向了,但不仅在portlet 中,而且在门户中。
【问题讨论】:
-
你试过 FacesContext.getCurrentInstance().getExternalContext().getResponse().sendRedirect("url"); FacesContext.getCurrentInstance().responseComplete(); ?
-
我没有 sendRedirect 方法。我尝试使用 responseComplete,但这会导致门户重定向之类的事情,因为我得到的空白页面只有“”。
标签: redirect portlet jboss-portal gatein