When I click this url "http://localhost:8080/web/guest/pages" , it goes to very first page i.e. page0 under the Page menu (Liferay Page).
But my requirement, when i use url like http://localhost:8080/web/guest/pages?showPage=page3 , it should display the page3 instead of page0 under same Page menu (Liferay Page).
Here snapshot of portlet.xml and faces-config.xml. it tried with following code
ServletRequest request = PageRequestUtil.getPortalRequest();
String nextPage = request.getParameter("showPage");
if (!StringUtils.isEmpty(nextPage)) {
this.state.navigateTo("pag3");
this.state.execute();
this.state.render();
}
I am getting following exception
Caused by: java.lang.NullPointerException: context
at javax.faces.component.UIComponentBase.getClientId(UIComponentBase.java:194)
at com.icesoft.faces.context.DOMContext.attachDOMContext(DOMContext.java:114)
at com.icesoft.faces.renderkit.dom_html_basic.HiddenRenderer.renderEnd(HiddenRenderer.java:61)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeEnd(DomBasicRenderer.java:128)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:528)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
Here is snapshot of portlet.xml and faces-config.xml.
portlet.xml
<portlet>
<portlet-name>Pages</portlet-name>
<display-name>Pages</display-name>
<portlet-class>com.icesoft.faces.webapp.http.portlet.MainPortlet</portlet-class>
<init-param>
<name>com.icesoft.faces.portlet.viewPageURL</name>
<value>/jsp/page0.iface</value>
</init-param>
</portlet>
faces-config.xml
<navigation-rule>
<from-view-id>/jsp/page0.jsp</from-view-id>
<navigation-case>
<from-outcome>pag1</from-outcome>
<to-view-id>/jsp/page1.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>pag3</from-outcome>
<to-view-id>/jsp/page3.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/page1.jsp</from-view-id>
<navigation-case>
<from-outcome>pag2</from-outcome>
<to-view-id>/jsp/page2.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/page2.jsp</from-view-id>
<navigation-case>
<from-outcome>pag3</from-outcome>
<to-view-id>/jsp/page3.jsp</to-view-id>
</navigation-case>
Please suggest me.