hi, I'm trying to write some JSF portlets within one portlet application but encountered some problems concerning navigation rules when I put more than one JSF portlet per portal page.
I'm using liferay 3.6.1 with MyFaces snapshots 20050828, 20050908. When I put just one portlet on my page everything concerning the navigation rules (with <h:commandButton action="p1next" value="go on" /> stuff) work fine and I get to the next view. But when I put a second faces portlet on the page navigation and invoking actions on backing beans in the second portlet just doesn't work at all. If I remove both portlets and put the second portlet on the page again (so that I'm having just one portlet again) this portlet works fine as well. So I assume that navigation settings in faces-config.xml must be correct. It has something to do with the arrangement of two faces portlets on the portal page so that the second one stops working as expected. Is there anybody who might help me or has anybody written a bunch of portlets which are working on the same portal page together? Thanks in advance jm I will attache my web.xml, faces-config.xml and portlet.xml web.xml ============================ <?xml version="1.0"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>PROJECT_NAME</display-name> <context-param> <param-name>company_id</param-name> <param-value>liferay.com</param-value> </context-param> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> <context-param> <param-name>javax.faces.application.CONFIG_FILES</param-name> <param-value>/WEB-INF/faces-config.xml</param-value> </context-param> <listener> <listener-class>com.liferay.portal.servlet.PortletContextListener</listener-class> </listener> <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> <servlet> <servlet-name>PROJECT_NAME</servlet-name> <servlet-class>com.liferay.portal.servlet.PortletServlet</servlet-class> <init-param> <param-name>portlet-class</param-name> <param-value>org.apache.myfaces.portlet.MyFacesGenericPortlet</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet> <servlet-name>FacesServlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>PROJECT_NAME</servlet-name> <url-pattern>/PROJECT_NAME/*</url-pattern> </servlet-mapping> <taglib> <taglib-uri>http://java.sun.com/portlet</taglib-uri> <taglib-location>/WEB-INF/tld/liferay-portlet.tld</taglib-location> </taglib> </web-app> faces-config.xml: ================== <?xml version="1.0"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <faces-config xmlns="http://java.sun.com/JSF/Configuration"> <factory> <faces-context-factory>org.apache.myfaces.context.MyFacesContextFactoryImpl</faces-context-factory> </factory> <!-- navigation for JSF portlet 1 --> <navigation-rule> <from-view-id>/jsp/jsf1/index.jsp</from-view-id> <navigation-case> <from-outcome>p1next</from-outcome> <to-view-id>/jsp/jsf1/n1.jsp</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>/jsp/jsf1/n1.jsp</from-view-id> <navigation-case> <from-outcome>p1back</from-outcome> <to-view-id>/jsp/jsf1/index.jsp</to-view-id> </navigation-case> </navigation-rule> <!-- navigation for JSF portlet 2 --> <navigation-rule> <from-view-id>/jsp/jsf2/index.jsp</from-view-id> <navigation-case> <from-outcome>p2next</from-outcome> <to-view-id>/jsp/jsf2/n1.jsp</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>/jsp/jsf2/n1.jsp</from-view-id> <navigation-case> <from-outcome>p2back</from-outcome> <to-view-id>/jsp/jsf2/index.jsp</to-view-id> </navigation-case> </navigation-rule> </faces-config> portlet.xml ============================= <portlet> <portlet-name>jsf2</portlet-name> <display-name>jsf2</display-name> <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class> <init-param> <name>default-view</name> <value>/jsp/jsf2/index.jsp</value> </init-param> <supports> <mime-type>text/html</mime-type> </supports> <portlet-info> <title>jsf2</title> <short-title>jsf2</short-title> <keywords>jsf2</keywords> </portlet-info> </portlet>
