How can I call an managed bean action when portlet mode (EDIT,VIEW) is changed and process the navigation rules to discover the page to be rendered?


Galen Dunkleberger wrote:

Not sure if this is an issue with MyFaces or the JBoss Portal implementation so I'll throw it to all of you guys first and see if you've ever come across the problem. So I'm using JBoss Portal 2.0.1 RC1 with the latest nightly build of MyFaces. If I use the default portal and create a new portlet using MyFacesGenericPortlet the interface renders, I can navigate to my portlet, everything works great. If I declare a separate portal instance within the portal server (so i now have a *-portal.xml configuration file) and I say I want to use one of my MyFacesGenericPortlet's as the default portlet and I navigate to the portal using a url like http://localhost:8080/portal/myportal/ i get the following exception....

javax.portlet.PortletException: value must not be null
        
org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:254)
        org.apache.myfaces.portlet.MyFacesGenericPortlet.processAction
(MyFacesGenericPortlet.java:233)

snipped...


However, if I put the entire url in like this http://localhost:8080/portal/myportal/?ctrl:id=page.myportal.myTest it once again renders fine. I did some debugging through the code and it seems that when I use the first url to navigate to the portal the processAction method is called on MyFacesGenericPortlet. It blows up because no viewId has been set in the view root. However if I navigate to the portal using the second url the nonFacesRequest(RenderRequest request, RenderResponse response) method is called which of course sets the viewId of the view root and it renders fine.

So my question is why when trying to navigate to the default page does the portal call processAction on MyFacesGenericPortlet? Is this a JBoss Portal problem or a MyFacesGenericPortlet problem? Does anyone know a fix for this?

                                             Thanks


Reply via email to