[
http://jira.jboss.com/jira/browse/JBPORTAL-530?page=all ]
Julien Viet resolved JBPORTAL-530.
----------------------------------
Resolution: Won't Fix
Null Pointer Exception in MyFacesGenericPortlet
-----------------------------------------------
Key: JBPORTAL-530
URL:
http://jira.jboss.com/jira/browse/JBPORTAL-530
Project: JBoss Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Environment: Jboss 4.0.3 SP1 - portal 2.0.1 RC3
Reporter: Stefan Tausendpfund
Priority: Minor
Fix For: 2.6.Beta1
Attachments: DuplicatePortletTestWeb.tgz
Hello,
the initial post is from the Jboss portal forum.
I repost it to attach a sample application showing this error.
<snip>
Hello,
we created an portal application on JBoss Server 4.0.3SP1 with portal 2.0.1RC3 using
myfaces MyFacesGenericPortlet. We have several pages and several portlets in one page. One
portlet is present in all pages. If I make an action on this portlet (portletwindow0) and
switch the page (portletwindow1) i get an NPE in the facesRender method of the
MyFacesGenericPortlet.
The lookup of the faces context with
ServletFacesContextImpl facesContext = (ServletFacesContextImpl)request.
getPortletSession().
getAttribute(CURRENT_FACES_CONTEXT);
returns a null object and the following statement
if (facesContext.getResponseComplete()) return;
fails.
On first entry of doView the getAttribure looks for an Attribute:
javax.portlet.p..<portletwindow0>?org.apache.myfaces.portlet.MyFacesGenericPortlet.CURRENT_FACES_CONTEXT
After switching the page it looks for
javax.portlet.p..<portletwindow1>?org.apache.myfaces.portlet.MyFacesGenericPortlet.CURRENT_FACES_CONTEXT
but the facescontext is still with the key window0 in the session.
Using the same window name in different pages for the same portlet leeds to a portal
error.
<snap>
best regards
Stefan Tausendpfund
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira