0

I am developing a small application using jsf in portal websphere, in the doView method of the protlet, i redirect to a jsf page called "edit.xhtml"

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

and in the edit page, i have a datatable which displays the names of registered people from the data base (I am using the primefaces datatable). and i have a link to another page called "index"

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

When i press the link, it redirects me to a normal page not the portal page, i mean the header and footer are not displayed in the index page, something like that in the image attachedindex.xhtml page

And when i tried to follow the answer here, and added those lines to the faces-config.xml file

<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>

the style of primefaces is not applied beside that the index page is displayed as it is not as a portal page.

Community
  • 1
  • 1
Kingo Mostafa
  • 357
  • 5
  • 21

1 Answers1

0

If you are using JavaServer Faces (JSF), then you should create JSF portlet project (not basic portlet).

Helpful links:

Custom login portlet

WebSphere Portal v8.0 Knowledge Center

grajsek
  • 856
  • 2
  • 11
  • 24