【问题标题】:navigation between jsf pages in portal not working门户网站中 jsf 页面之间的导航不起作用
【发布时间】:2015-08-06 22:01:40
【问题描述】:

我正在portal websphere中使用jsf开发一个小应用程序,在protlet的doView方法中,我重定向到一个名为“edit.xhtml”的jsf页面

PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher("/edit.xhtml");

在编辑页面中,我有一个数据表,它显示数据库中注册人员的姓名(我使用的是 primefaces 数据表)。 我有一个链接到另一个名为“索引”的页面

<h:link outcome="index" value="view all users" />

当我点击链接时,它会将我重定向到普通页面而不是门户页面,我的意思是页眉和页脚不显示在索引页面中,类似于附图中的内容

当我尝试遵循答案here 并将这些行添加到 faces-config.xml 文件中时

<navigation-rule>
    <display-name>edit.xhtml</display-name>
    <from-view-id>edit.xhtml</from-view-id>
    <navigation-case>
        <from-outcome>index</from-outcome>
        <to-view-id>index.xhtml</to-view-id>
    </navigation-case>
</navigation-rule>

    <application>
        <view-handler>com.ibm.faces20.portlet.FaceletPortletViewHandler</view-handler>
        <resource-handler>com.ibm.faces20.portlet.httpbridge.PortletResourceHandler</resource-handler>
        <el-resolver>com.ibm.faces20.portlet.PortletELResolver</el-resolver>
    </application>

primefaces 的样式除了显示索引页面之外没有应用,因为它不是门户页面。

【问题讨论】:

  • 抱歉,我是门户新手,无法理解您的意思。无论如何,我正在使用 WebSphere Portal V8.0。
  • 让我重新表述至少一个部分:尝试过最新的 PrimeFaces 版本吗?
  • 我使用的是 primefaces-5.0

标签: jsf primefaces websphere-portal


【解决方案1】:

如果您使用的是 JavaServer Faces (JSF),那么您应该创建 JSF portlet 项目(不是基本 portlet)。

有用的链接:

Custom login portlet

WebSphere Portal v8.0 Knowledge Center

【讨论】:

  • 据我了解...您如何从问题中知道情况并非如此...
猜你喜欢
  • 1970-01-01
  • 2017-04-21
  • 1970-01-01
  • 2011-11-03
  • 1970-01-01
  • 1970-01-01
  • 2011-11-26
  • 1970-01-01
  • 2011-03-30
相关资源
最近更新 更多